]> diplodocus.org Git - nmh/blobdiff - test/format/test-fmtdump
Fixed extra and missing trailing commas in SEE ALSO sections of man pages.
[nmh] / test / format / test-fmtdump
index 259e12a202cf9b0c5e338ecec7560bd17e2a22b7..82791f48ba30a48aff329cddf62dfffa1cba7223 100755 (executable)
@@ -19,6 +19,29 @@ setup_test
 # Use proper program, likely not the first one on PATH.
 fmtdump="${MH_LIBEXEC_DIR}/fmtdump"
 
+check_exit '-eq 1' "$fmtdump" -
+check_exit '-eq 1' "$fmtdump" -form
+check_exit '-eq 1' "$fmtdump" -format
+check_exit '-eq 1' "$fmtdump" foo bar
+check_exit '-eq 0' "$fmtdump" -format '
+    %4{} %(eq) %(getenv) %(decodecomp{}) %(trim{}) %(putaddr)
+    %(putlit) %(zputlit) %(compval{}) %(num)
+    %(plus) %(minus) %(multiply) %(divide) %(modulo)
+    %(charleft) %(kilo) %(kibi)
+    %(month{}) %(tzone{}) %(day{}) %(weekday{}) %(tws{}) %(pretty{})
+    %(sec{}) %(min{}) %(hour{}) %(year{}) %(yday{}) %(wday{})
+    %(clock{}) %(rclock{}) %(sday{}) %(dst{}) %(szone{})
+    %(date2local{}) %(date2gmt{})
+'
+check_exit '-eq 0' "$fmtdump" -format '
+    %(addr{}) %(pers{}) %(mbox{}) %(host{}) %(path{}) %(gname{})
+    %(note{}) %(proper{}) %(type{}) %(ingrp{}) %(nohost{})
+    %(formataddr) %(concataddr) %(getmymbox{}) %(getmyaddr{})
+    %<(null)%> %<(gt)%> %<(match)%> %<(amatch)%>
+    %(null) %(nonnull) %(ne) %(gt) %(match) %(amatch)
+'
+check_exit '-eq 0' "$fmtdump" -format "`printf '\302\010\014\015\011\177'`"
+
 expected=$MH_TEST_DIR/$$.expected
 expected_err=$MH_TEST_DIR/$$.expected_err
 actual=$MH_TEST_DIR/$$.actual
@@ -87,16 +110,16 @@ L7:        MYMBOX, c_name "from", c_type <ADDR>
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
-       FT_LS_DECODE
+       LS_DECODE
        STRF, width 14, fill ' '
 L8:    IF_V_EQ 0 continue else goto L9
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
-       FT_LS_DECODE
+       LS_DECODE
        STRF, width 17, fill ' '
 L9:    LIT "  "
        LS_COMP, comp "subject"
-       FT_LS_DECODE
+       LS_DECODE
        STR
        LS_COMP, comp "body"
        IF_S continue else goto L10
@@ -148,18 +171,18 @@ L7:       MYMBOX, c_name "from", c_type <ADDR>
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
-       FT_LS_DECODE
-       
+       LS_DECODE
+       LS_UNQUOTE
        STRF, width 14, fill ' '
 L8:    IF_V_EQ 0 continue else goto L9
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
-       FT_LS_DECODE
-       
+       LS_DECODE
+       LS_UNQUOTE
        STRF, width 17, fill ' '
 L9:    LIT "  "
        LS_COMP, comp "subject"
-       FT_LS_DECODE
+       LS_DECODE
        STR
        LS_COMP, comp "body"
        IF_S continue else goto L10