[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-122
From: |
Eric Blake |
Subject: |
[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-122-gcee1cf9 |
Date: |
Sat, 24 May 2008 13:14:00 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=cee1cf959014278f8efaf02c251c69b8ad577747
The branch, master has been updated
via cee1cf959014278f8efaf02c251c69b8ad577747 (commit)
from ee816a2224adb2a9eb20c4e5787875cd385437c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cee1cf959014278f8efaf02c251c69b8ad577747
Author: Eric Blake <address@hidden>
Date: Fri May 23 15:03:46 2008 -0600
Test NUL in frozen files.
* tests/testsuite.at (AT_CHECK_M4): Add parameter.
* tests/freeze.at (reloading nul): New test.
(AT_TEST_FREEZE): Inhibit -d when reloading frozen file.
(reloading unknown builtin): Likewise.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
tests/freeze.at | 38 ++++++++++++++++++++++++++++++++++++--
tests/testsuite.at | 8 ++++----
3 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef9a327..7041635 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-24 Eric Blake <address@hidden>
+
+ Test NUL in frozen files.
+ * tests/testsuite.at (AT_CHECK_M4): Add parameter.
+ * tests/freeze.at (reloading nul): New test.
+ (AT_TEST_FREEZE): Inhibit -d when reloading frozen file.
+ (reloading unknown builtin): Likewise.
+
2008-05-23 Eric Blake <address@hidden>
Improve handling of frozen file errors.
diff --git a/tests/freeze.at b/tests/freeze.at
index 548ced3..fd1981b 100644
--- a/tests/freeze.at
+++ b/tests/freeze.at
@@ -41,7 +41,7 @@ AT_CHECK_M4([-F frozen.m4f frozen.m4], [0], [stdout])
mv stdout out1
# Now rerun the original sequence, but using the frozen file.
-AT_CHECK_M4([-R frozen.m4f unfrozen.m4], [0], [stdout], [experr])
+AT_CHECK_M4([-R frozen.m4f unfrozen.m4], [0], [stdout], [experr], [], [ ])
AT_CHECK([cat out1 stdout], [0], [expout])
@@ -337,6 +337,40 @@ define{`a.b', `hello $1'}dnl
[[a.b{world}
]])
+## --------- ##
+## nul bytes ##
+## --------- ##
+
+# Check that NUL can be transparently preserved over freezing.
+AT_SETUP([reloading nul])
+AT_KEYWORDS([frozen])
+
+dnl AT_DATA can't generate NUL bytes (at least, not in all shells)
+AT_CHECK([printf 'divert(1)undivert(null.out)' || exit 77],
+ [0], [stdout], [ignore])
+mv stdout frozen.m4
+echo 'divert(0)hi' > unfrozen.m4
+
+# First generate the `expout' output by running over the sources before
+# freezing.
+AT_CHECK_M4([-I "$abs_srcdir" frozen.m4 unfrozen.m4], [0], [stdout], [stderr])
+
+mv stdout expout
+mv stderr experr
+
+# Now freeze the first source file.
+AT_CHECK_M4([-F frozen.m4f -I "$abs_srcdir" frozen.m4], [0], [stdout])
+
+mv stdout out1
+
+# Now rerun the original sequence, but using the frozen file.
+AT_CHECK_M4([-R frozen.m4f unfrozen.m4], [0], [stdout], [experr], [], [ ])
+
+AT_CHECK([cat out1 stdout], [0], [expout])
+
+AT_CLEANUP
+])
+
## ------- ##
## pushdef ##
## ------- ##
@@ -439,6 +473,6 @@ m4:input.m4:8: Warning: a: builtin `b' requested by frozen
file not found
m4:input.m4:10: Warning: builtin: undefined builtin `b'
a: <<b>>
c: `'
-]])
+]], [], [ ])
AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 089395e..60d8612 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -42,13 +42,13 @@ else
fi]])
# AT_CHECK_M4(ARGS, [EXIT-STATUS = 0], [STDOUT = `'], [STDERR = `'],
-# [STDIN = `/dev/null'])
+# [STDIN = `/dev/null'], [INHIBIT-D])
# ------------------------------------------------------------------
# Run m4 with ARGS, and stdin redirected from STDIN, or with stdin closed
# if STDIN is `-'. ARGS may redirect stdout and/or stderr, but should
# not redirect stdin. Expect EXIT-STATUS, with output matching STDOUT and
# STDERR as in AT_CHECK. If STDERR is specified, normalize the observed
-# error output.
+# error output. Unless INHIBIT-D is specified, add -d prior to ARGS.
#
# When testing an uninstalled wrapper, tests/m4 is on the path, but invokes
# src/m4, which may itself be a libtool wrapper. Also, some platforms
@@ -67,8 +67,8 @@ fi]])
# or m4:input.m4:7: cannot open module `no_such': can't open the module
# to m4:input.m4:7: cannot open module `no_such'
m4_define([AT_CHECK_M4],
-[AT_CHECK([$M4 -d $1 ]m4_if([$5], [-], [<&-],
- [< m4_default([$5], [/dev/null])]),
+[AT_CHECK([$M4 m4_ifval([$6], [], [-d ])$1 ]m4_if([$5], [-], [<&-],
+ [< m4_default([$5], [/dev/null])]),
[$2], [$3], m4_case([$4], [], [], [ignore], [ignore], [stderr]))
m4_case([$4], [], [], [ignore], [],
[AT_CHECK([[sed 's/^[^:]*[lt-]*m4[.ex]*:/m4:/
hooks/post-receive
--
GNU M4 source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU M4 source repository branch, master, updated. cvs-readonly-122-gcee1cf9,
Eric Blake <=