]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
alphabetize tests/usage
authorMark Andrews <marka@isc.org>
Thu, 3 Sep 2020 04:09:38 +0000 (14:09 +1000)
committerMark Andrews <marka@isc.org>
Mon, 7 Sep 2020 22:07:40 +0000 (22:07 +0000)
bin/tests/system/feature-test.c

index 562cd9b0241230373ad24cbe6c0409287d308033..3b772968b9f81c4017ac2e46c86d96e53df39d5f 100644 (file)
@@ -36,16 +36,16 @@ static void
 usage(void) {
        fprintf(stderr, "usage: feature-test <arg>\n");
        fprintf(stderr, "args:\n");
-       fprintf(stderr, "       --edns-version\n");
-       fprintf(stderr, "       --enable-dnsrps\n");
-       fprintf(stderr, "       --gethostname\n");
-       fprintf(stderr, "       --gssapi\n");
-       fprintf(stderr, "       --have-geoip2\n");
-       fprintf(stderr, "       --have-libxml2\n");
-       fprintf(stderr, "       --ipv6only=no\n");
-       fprintf(stderr, "       --with-idn\n");
-       fprintf(stderr, "       --with-lmdb\n");
-       fprintf(stderr, "       --with-dlz-filesystem\n");
+       fprintf(stderr, "\t--edns-version\n");
+       fprintf(stderr, "\t--enable-dnsrps\n");
+       fprintf(stderr, "\t--gethostname\n");
+       fprintf(stderr, "\t--gssapi\n");
+       fprintf(stderr, "\t--have-geoip2\n");
+       fprintf(stderr, "\t--have-libxml2\n");
+       fprintf(stderr, "\t--ipv6only=no\n");
+       fprintf(stderr, "\t--with-dlz-filesystem\n");
+       fprintf(stderr, "\t--with-idn\n");
+       fprintf(stderr, "\t--with-lmdb\n");
 }
 
 int
@@ -55,14 +55,6 @@ main(int argc, char **argv) {
                return (1);
        }
 
-       if (strcmp(argv[1], "--enable-dnsrps") == 0) {
-#ifdef USE_DNSRPS
-               return (0);
-#else  /* ifdef USE_DNSRPS */
-               return (1);
-#endif /* ifdef USE_DNSRPS */
-       }
-
        if (strcmp(argv[1], "--edns-version") == 0) {
 #ifdef DNS_EDNS_VERSION
                printf("%d\n", DNS_EDNS_VERSION);
@@ -72,6 +64,14 @@ main(int argc, char **argv) {
                return (0);
        }
 
+       if (strcmp(argv[1], "--enable-dnsrps") == 0) {
+#ifdef USE_DNSRPS
+               return (0);
+#else  /* ifdef USE_DNSRPS */
+               return (1);
+#endif /* ifdef USE_DNSRPS */
+       }
+
        if (strcmp(argv[1], "--gethostname") == 0) {
                char hostname[MAXHOSTNAMELEN];
                int n;
@@ -125,30 +125,6 @@ main(int argc, char **argv) {
 #endif /* ifdef HAVE_LIBXML2 */
        }
 
-       if (strcmp(argv[1], "--with-idn") == 0) {
-#ifdef HAVE_LIBIDN2
-               return (0);
-#else  /* ifdef HAVE_LIBIDN2 */
-               return (1);
-#endif /* ifdef HAVE_LIBIDN2 */
-       }
-
-       if (strcmp(argv[1], "--with-lmdb") == 0) {
-#ifdef HAVE_LMDB
-               return (0);
-#else  /* ifdef HAVE_LMDB */
-               return (1);
-#endif /* ifdef HAVE_LMDB */
-       }
-
-       if (strcmp(argv[1], "--with-dlz-filesystem") == 0) {
-#ifdef DLZ_FILESYSTEM
-               return (0);
-#else  /* ifdef DLZ_FILESYSTEM */
-               return (1);
-#endif /* ifdef DLZ_FILESYSTEM */
-       }
-
        if (strcmp(argv[1], "--ipv6only=no") == 0) {
 #ifdef WIN32
                return (0);
@@ -170,6 +146,30 @@ main(int argc, char **argv) {
 #endif /* ifdef WIN32 */
        }
 
+       if (strcmp(argv[1], "--with-dlz-filesystem") == 0) {
+#ifdef DLZ_FILESYSTEM
+               return (0);
+#else  /* ifdef DLZ_FILESYSTEM */
+               return (1);
+#endif /* ifdef DLZ_FILESYSTEM */
+       }
+
+       if (strcmp(argv[1], "--with-idn") == 0) {
+#ifdef HAVE_LIBIDN2
+               return (0);
+#else  /* ifdef HAVE_LIBIDN2 */
+               return (1);
+#endif /* ifdef HAVE_LIBIDN2 */
+       }
+
+       if (strcmp(argv[1], "--with-lmdb") == 0) {
+#ifdef HAVE_LMDB
+               return (0);
+#else  /* ifdef HAVE_LMDB */
+               return (1);
+#endif /* ifdef HAVE_LMDB */
+       }
+
        fprintf(stderr, "unknown arg: %s\n", argv[1]);
        usage();
        return (1);