[hackers] [sbase] Audit test(1) || FRIGN

From: <git_AT_suckless.org>
Date: Thu, 19 Mar 2015 11:13:24 +0100 (CET)

commit f3fee504483456c806960a0251c76a88163b245a
Author: FRIGN <dev_AT_frign.de>
Date: Tue Mar 17 23:35:11 2015 +0100

    Audit test(1)
    
    Only add empty lines before returns, everything else is ok.
    Also add the STANDARDS-section to the manpage, which was only
    present as a heading until now.

diff --git a/README b/README
index 2ddf7a6..bad461d 100644
--- a/README
+++ b/README
_AT_@ -74,7 +74,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 =*| tail yes none
 =* tar non-posix none
 =*| tee yes none
-=* test yes none
+=*| test yes none
 =*| time yes none
 =* touch yes none
 #* tr yes none
diff --git a/test.1 b/test.1
index bce0af3..2f24063 100644
--- a/test.1
+++ b/test.1
_AT_@ -117,3 +117,8 @@ An error occurred.
 .Sh SEE ALSO
 .Xr expr 1
 .Sh STANDARDS
+The
+.Nm
+utility is compliant with the
+.St -p1003.1-2008
+specification.
diff --git a/test.c b/test.c
index 367cec3..6acec0c 100644
--- a/test.c
+++ b/test.c
_AT_@ -87,6 +87,7 @@ find_test(struct test *tests, char *name)
         for (t = tests; t->name; t++)
                 if (!strcmp(t->name, name))
                         return t;
+
         return NULL;
 }
 
_AT_@ -114,6 +115,7 @@ twoarg(char *argv[])
                 return t->func(argv[1]);
 
         enprintf(2, "bad unary test %s\n", argv[0]);
+
         return 0; /* not reached */
 }
 
_AT_@ -129,6 +131,7 @@ threearg(char *argv[])
                 return !twoarg(argv + 1);
 
         enprintf(2, "bad binary test %s\n", argv[1]);
+
         return 0; /* not reached */
 }
 
_AT_@ -139,6 +142,7 @@ fourarg(char *argv[])
                 return !threearg(argv + 1);
 
         enprintf(2, "too many arguments\n");
+
         return 0; /* not reached */
 }
 
Received on Thu Mar 19 2015 - 11:13:24 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 19 2015 - 11:24:30 CET