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: Fri, 29 Sep 2006 18:20:14 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/09/29 18:20:13

Index: tests/options.at
===================================================================
RCS file: /sources/m4/m4/tests/options.at,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- tests/options.at    29 Sep 2006 12:26:07 -0000      1.14
+++ tests/options.at    29 Sep 2006 18:20:13 -0000      1.15
@@ -239,7 +239,7 @@
 
 AT_SETUP([--debugfile])
 
-dnl For a while, CVS m4 mistakenly replaced debug output with stdout
+dnl For a while, CVS m4 mistakenly sent debug output to stdout
 dnl when stdout and stderr were the same file.
 
 AT_DATA([[in]], [[foo
@@ -253,6 +253,34 @@
 
 AT_CHECK([cmp trace1 trace2])
 
+dnl m4 1.4.x mistakenly created the trace file.  --help and --version
+dnl should always override, even if they come later in the command line
+AT_CHECK_M4([--debugfile=trace3 --help], [0], [ignore])
+AT_CHECK_M4([--debugfile=trace3 --version], [0], [ignore])
+AT_CHECK([test -f trace3], [1])
+
+dnl check that trace file failure causes an error, but allows processing
+AT_CHECK_M4([--debugfile=no_such_dir/trace -tfoo -Dfoo=bar in], [1],
+[[bar
+]], [[m4: cannot set debug file `no_such_dir/trace': No such file or directory
+m4trace: -1- foo -> `bar'
+]])
+
+dnl check that empty trace file discards trace data
+AT_CHECK_M4([--debugfile= -tfoo -Dfoo=bar in], [0],
+[[bar
+]])
+
+dnl check that all tracing gets diverted to the trace file.  Don't use
+dnl AT_CHECK_M4 on the first run, because sanitizing stderr breaks the
+dnl comparison with the raw data in the trace file of the second run.
+AT_CHECK([m4 -b -dV in], [0], [[foo
+]], [stderr])
+mv stderr expout
+AT_CHECK_M4([--debugfile=trace4 -dV in], [0], [[foo
+]])
+AT_CHECK([cat trace4], [0], [expout])
+
 AT_CLEANUP
 
 




reply via email to

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