]> sjero.net Git - wget/blobdiff - src/init.c
Merge quote module stuff with current mainline.
[wget] / src / init.c
index e079df95d12d1b2ac4afd24fb98df1a035260a51..fcb7c2ccbd8254c9a680ff8d536a13d891cb2a75 100644 (file)
@@ -1530,6 +1530,29 @@ cleanup (void)
 
 #ifdef TESTING
 
+const char *
+test_commands_sorted()
+{
+  int prev_idx = 0, next_idx = 1;
+  int command_count = countof (commands) - 1;
+  int cmp = 0;
+  while (next_idx <= command_count)
+    {
+      cmp = strcasecmp (commands[prev_idx].name, commands[next_idx].name);
+      if (cmp > 0)
+        {
+          mu_assert ("FAILED", false);
+          break;
+        }     
+      else
+        { 
+          prev_idx ++;
+         next_idx ++;
+        }
+    }
+  return NULL;
+}
+
 const char *
 test_cmd_spec_restrict_file_names()
 {