m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/tests/options.at,v


From: Eric Blake
Subject: Changes to m4/tests/options.at,v
Date: Thu, 28 Sep 2006 16:14:10 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/09/28 16:14:09

Index: tests/options.at
===================================================================
RCS file: /sources/m4/m4/tests/options.at,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- tests/options.at    21 Sep 2006 16:40:04 -0000      1.12
+++ tests/options.at    28 Sep 2006 16:14:09 -0000      1.13
@@ -19,9 +19,61 @@
 AT_BANNER([Options.])
 
 
-## ---------------- ##
-## Option grouping. ##
-## ---------------- ##
+## ------------------ ##
+## deprecated options ##
+## ------------------ ##
+
+AT_SETUP([deprecated options])
+
+dnl -N/--diversions are no-ops since 1.4.x
+AT_CHECK_M4([-N1 --diversions=1], [0], [],
+[[m4: Warning: `-N' is deprecated
+m4: Warning: `--diversions' is deprecated
+]])
+
+dnl -H/--hashsize are no-ops since 2.0
+AT_CHECK_M4([-H1 --hashsize=1], [0], [],
+[[m4: Warning: `-H' is deprecated
+m4: Warning: `--hashsize' is deprecated
+]])
+
+dnl -S/-T are no-ops for compatibility
+AT_CHECK_M4([-S1 -T1], [0], [],
+[[m4: Warning: `-S' is deprecated
+m4: Warning: `-T' is deprecated
+]])
+
+dnl -Bint can be confused with its no-op meaning in 1.4.x, but all other
+dnl uses of -B or its long option are okay
+AT_CHECK_M4([-B1], [0], [],
+[[m4: Warning: recommend using `-B ./1' instead
+]])
+AT_CHECK_M4([-B./1 --prepend-include=1], [0], [],
+[[]])
+
+dnl --error-output is a misleading name
+AT_CHECK_M4([--error-output=trace], [0], [],
+[[m4: Warning: `--error-output' is deprecated, use `--debugfile' instead
+]])
+AT_CHECK([rm trace])
+
+dnl -o will change meaning in the future
+AT_CHECK_M4([-otrace], [0], [],
+[[m4: Warning: `-o' is deprecated, use `--debugfile' instead
+]])
+AT_CHECK([rm trace])
+
+dnl -e is an odd spelling for --interactive
+AT_CHECK_M4([-e], [0], [],
+[[m4: Warning: `-e' is deprecated, use `-i' instead
+]])
+
+AT_CLEANUP
+
+
+## --------------- ##
+## option grouping ##
+## --------------- ##
 
 AT_SETUP([option grouping])
 
@@ -80,64 +132,9 @@
 
 AT_CLEANUP
 
-## ------------------ ##
-## Discard comments.  ##
-## ------------------ ##
-
-AT_SETUP([--discard-comments])
-
-AT_DATA([[in]],
-[[This is not a comment # but this is.
-# This line should dissappear completely.
-This should not disappear.
-changecom(`<!--', `-->')
-html <!--
-comment
- --> ends.
-]])
-
-AT_CHECK_M4([-c in], [0],
-[[This is not a comment This should not disappear.
-
-html  ends.
-]])
-
-AT_CLEANUP
-
-
-
-## ------------------ ##
-## import-environment ##
-## ------------------ ##
-
-AT_SETUP([--import-environment])
-
-AT_DATA([[in]],
-[[`TEST'=TEST
-`ZAPPED'=ZAPPED
-`OVERRIDE'=OVERRIDE
-]])
-
-TEST='This is an environment variable'
-export TEST
-
-ZAPPED='This is an environment variable which we will delete'
-export ZAPPED
-
-OVERRIDE='This is an environment variable which we will change'
-export OVERRIDE
-
-AT_CHECK_M4([--import-environment -UZAPPED -DOVERRIDE='It is changed.' in],
-[0], [[TEST=This is an environment variable
-ZAPPED=ZAPPED
-OVERRIDE=It is changed.
-]])
-
-AT_CLEANUP
-
 
 ## ----------- ##
-## debug-flags ##
+## debug flags ##
 ## ----------- ##
 
 AT_SETUP([--debug])
@@ -189,53 +186,109 @@
 AT_CLEANUP
 
 
-## ---------------- ##
-## obsolete options ##
-## ---------------- ##
+## --------- ##
+## debugfile ##
+## --------- ##
 
-AT_SETUP([deprecated options])
+AT_SETUP([--debugfile])
 
-dnl -N/--diversions are no-ops since 1.4.x
-AT_CHECK_M4([-N1 --diversions=1], [0], [],
-[[m4: Warning: `-N' is deprecated
-m4: Warning: `--diversions' is deprecated
+dnl For a while, CVS m4 mistakenly replaced debug output with stdout
+dnl when stdout and stderr were the same file.
+
+AT_DATA([[in]], [[foo
 ]])
 
-dnl -H/--hashsize are no-ops since 2.0
-AT_CHECK_M4([-H1 --hashsize=1], [0], [],
-[[m4: Warning: `-H' is deprecated
-m4: Warning: `--hashsize' is deprecated
+AT_CHECK_M4([--debugfile=trace1 -tfoo -Dfoo=bar in 2>&1], [0], [[bar
 ]])
 
-dnl -S/-T are no-ops for compatibility
-AT_CHECK_M4([-S1 -T1], [0], [],
-[[m4: Warning: `-S' is deprecated
-m4: Warning: `-T' is deprecated
+AT_CHECK_M4([--debugfile=trace2 -tfoo -Dfoo=bar in], [0], [[bar
 ]])
 
-dnl -Bint can be confused with its no-op meaning in 1.4.x, but all other
-dnl uses of -B or its long option are okay
-AT_CHECK_M4([-B1], [0], [],
-[[m4: Warning: recommend using `-B ./1' instead
+AT_CHECK([cmp trace1 trace2])
+
+AT_CLEANUP
+
+
+## ---------------- ##
+## discard comments ##
+## ---------------- ##
+
+AT_SETUP([--discard-comments])
+
+AT_DATA([[in]],
+[[This is not a comment # but this is.
+# This line should dissappear completely.
+This should not disappear.
+changecom(`<!--', `-->')
+html <!--
+comment
+ --> ends.
 ]])
-AT_CHECK_M4([-B./1 --prepend-include=1], [0], [],
-[[]])
 
-dnl --error-output is a misleading name
-AT_CHECK_M4([--error-output=trace], [0], [],
-[[m4: Warning: `--error-output' is deprecated, use `--debugfile' instead
+AT_CHECK_M4([-c in], [0],
+[[This is not a comment This should not disappear.
+
+html  ends.
 ]])
-AT_CHECK([rm trace])
 
-dnl -o will change meaning in the future
-AT_CHECK_M4([-otrace], [0], [],
-[[m4: Warning: `-o' is deprecated, use `--debugfile' instead
+AT_CLEANUP
+
+
+## ---------------- ##
+## help and version ##
+## ---------------- ##
+
+AT_SETUP([--help and --version])
+
+AT_CHECK_M4([--help], [0], [stdout])
+AT_CHECK([[sed -n -e 's|Usage:.*\[OPTION\]... \[FILE\]...|success|p' stdout]],
+[0], [success
+])
+
+AT_CHECK_M4([--version], [0], [stdout])
+AT_CHECK([[sed -n -e 's|There is NO WARRANTY.*|success|p' stdout]],
+[0], [success
+])
+
+dnl make sure option specified first takes precedence
+AT_CHECK_M4([--help --version], [0], [stdout])
+AT_CHECK([[sed -n -e 's|Usage:.*\[OPTION\]... \[FILE\]...|success|p' stdout]],
+[0], [success
+])
+
+AT_CHECK_M4([--version --help], [0], [stdout])
+AT_CHECK([[sed -n -e 's|There is NO WARRANTY.*|success|p' stdout]],
+[0], [success
+])
+
+AT_CLEANUP
+
+
+## ------------------ ##
+## import-environment ##
+## ------------------ ##
+
+AT_SETUP([--import-environment])
+
+AT_DATA([[in]],
+[[`TEST'=TEST
+`ZAPPED'=ZAPPED
+`OVERRIDE'=OVERRIDE
 ]])
-AT_CHECK([rm trace])
 
-dnl -e is an odd spelling for --interactive
-AT_CHECK_M4([-e], [0], [],
-[[m4: Warning: `-e' is deprecated, use `-i' instead
+TEST='This is an environment variable'
+export TEST
+
+ZAPPED='This is an environment variable which we will delete'
+export ZAPPED
+
+OVERRIDE='This is an environment variable which we will change'
+export OVERRIDE
+
+AT_CHECK_M4([--import-environment -UZAPPED -DOVERRIDE='It is changed.' in],
+[0], [[TEST=This is an environment variable
+ZAPPED=ZAPPED
+OVERRIDE=It is changed.
 ]])
 
 AT_CLEANUP
@@ -285,36 +338,6 @@
 AT_CLEANUP
 
 
-## ---------------- ##
-## help and version ##
-## ---------------- ##
-
-AT_SETUP([--help and --version])
-
-AT_CHECK_M4([--help], [0], [stdout])
-AT_CHECK([[sed -n -e 's|Usage:.*\[OPTION\]... \[FILE\]...|success|p' stdout]],
-[0], [success
-])
-
-AT_CHECK_M4([--version], [0], [stdout])
-AT_CHECK([[sed -n -e 's|There is NO WARRANTY.*|success|p' stdout]],
-[0], [success
-])
-
-dnl make sure option specified first takes precedence
-AT_CHECK_M4([--help --version], [0], [stdout])
-AT_CHECK([[sed -n -e 's|Usage:.*\[OPTION\]... \[FILE\]...|success|p' stdout]],
-[0], [success
-])
-
-AT_CHECK_M4([--version --help], [0], [stdout])
-AT_CHECK([[sed -n -e 's|There is NO WARRANTY.*|success|p' stdout]],
-[0], [success
-])
-
-AT_CLEANUP
-
-
 ## ----- ##
 ## safer ##
 ## ----- ##
@@ -357,26 +380,3 @@
 ])
 
 AT_CLEANUP
-
-
-## --------- ##
-## debugfile ##
-## --------- ##
-
-AT_SETUP([--debugfile])
-
-dnl For a while, CVS m4 mistakenly replaced debug output with stdout
-dnl when stdout and stderr were the same file.
-
-AT_DATA([[in]], [[foo
-]])
-
-AT_CHECK_M4([--debugfile=trace1 -tfoo -Dfoo=bar in 2>&1], [0], [[bar
-]])
-
-AT_CHECK_M4([--debugfile=trace2 -tfoo -Dfoo=bar in], [0], [[bar
-]])
-
-AT_CHECK([cmp trace1 trace2])
-
-AT_CLEANUP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]