CVSROOT: /sources/m4 Module name: m4 Changes by: Eric Blake <ericb> 06/10/06 15:24:10
Index: tests/options.at =================================================================== RCS file: /sources/m4/m4/tests/options.at,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- tests/options.at 3 Oct 2006 12:57:18 -0000 1.16 +++ tests/options.at 6 Oct 2006 15:24:10 -0000 1.17 @@ -68,6 +68,11 @@ [[m4: Warning: `-e' is deprecated, use `-i' instead ]]) +dnl --arglength is an older spelling for --debuglen +AT_CHECK_M4([--arglength=10], [0], [], +[[m4: Warning: `--arglength' is deprecated, use `--debuglen' instead +]]) + AT_CLEANUP @@ -133,53 +138,6 @@ AT_CLEANUP -## --------- ## -## arglength ## -## --------- ## - -AT_SETUP([--arglength]) - -dnl Check for argument validation. - -AT_DATA([in], -[[define(`echo', `$@')dnl -traceon(`echo')dnl -echo(`long string') -]]) - -AT_CHECK_M4([--arglength=-1 in], [1], [], -[[m4: invalid debug argument length `-1' -]]) - -AT_CHECK_M4([--arglength oops in], [1], [], -[[m4: invalid debug argument length `oops' -]]) - -AT_CHECK_M4([-l 10oops in], [1], [], -[[m4: invalid character following debug argument length in `10oops' -]]) - -dnl MiB is the suffix to implict 1, resulting in 1048576 -AT_CHECK_M4([-lMiB in], [0], [[long string -]], [[m4trace: -1- echo(`long string') -> ``long string'' -]]) - -dnl this assumes size_t is no bigger than 64 bits -AT_CHECK_M4([-l 123456789012345678901234567890 in], [1], [], -[[m4: debug argument length `123456789012345678901234567890' too large -]]) - -AT_CHECK_M4([-l 3 in], [0], [[long string -]], [[m4trace: -1- echo(`lon...') -> ``lo...' -]]) - -AT_CHECK_M4([--arglength=3 -l0 in], [0], [[long string -]], [[m4trace: -1- echo(`long string') -> ``long string'' -]]) - -AT_CLEANUP - - ## ----------- ## ## debug flags ## ## ----------- ## @@ -285,6 +243,53 @@ AT_CLEANUP +## -------- ## +## debuglen ## +## -------- ## + +AT_SETUP([--debuglen]) + +dnl Check for argument validation. + +AT_DATA([in], +[[define(`echo', `$@')dnl +traceon(`echo')dnl +echo(`long string') +]]) + +AT_CHECK_M4([--debuglen=-1 in], [1], [], +[[m4: invalid debug argument length `-1' +]]) + +AT_CHECK_M4([--debuglen oops in], [1], [], +[[m4: invalid debug argument length `oops' +]]) + +AT_CHECK_M4([-l 10oops in], [1], [], +[[m4: invalid character following debug argument length in `10oops' +]]) + +dnl MiB is the suffix to implict 1, resulting in 1048576 +AT_CHECK_M4([-lMiB in], [0], [[long string +]], [[m4trace: -1- echo(`long string') -> ``long string'' +]]) + +dnl this assumes size_t is no bigger than 64 bits +AT_CHECK_M4([-l 123456789012345678901234567890 in], [1], [], +[[m4: debug argument length `123456789012345678901234567890' too large +]]) + +AT_CHECK_M4([-l 3 in], [0], [[long string +]], [[m4trace: -1- echo(`lon...') -> ``lo...' +]]) + +AT_CHECK_M4([--debuglen=3 -l0 in], [0], [[long string +]], [[m4trace: -1- echo(`long string') -> ``long string'' +]]) + +AT_CLEANUP + + ## ---------------- ## ## discard comments ## ## ---------------- ##
