X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Finit.c;h=fcb7c2ccbd8254c9a680ff8d536a13d891cb2a75;hb=e72b57629bf49cdfd663002a8bb336a67b958979;hp=1a5171ce89299e6b6d640c0cbfc297908f16ea8b;hpb=76780021d822779f839bbf85883292e15eb3f587;p=wget diff --git a/src/init.c b/src/init.c index 1a5171ce..fcb7c2cc 100644 --- a/src/init.c +++ b/src/init.c @@ -28,8 +28,6 @@ Corresponding Source for a non-source form of such a combination shall include the source code for the parts of OpenSSL used as well as that of the covered work. */ -#define USE_GNULIB_ALLOC - #include "wget.h" #include @@ -1532,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() {