summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2006-06-20 05:35:38 +0000
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2006-06-20 05:35:38 +0000
commit66931ce882c6d3abe1c32566c0e1cd990ca493cf (patch)
tree3a25a7eafe5206bf09d0adc276305c6706a57ac5 /tests
parent814d1a1a07e5c2bbf03847e3f52f5b658223f07f (diff)
downloadautoconf-66931ce882c6d3abe1c32566c0e1cd990ca493cf.tar.gz
* lib/m4sugar/m4sugar.m4 (m4_init): Merge the two m4_wrap
calls, so that we do not care whether they are LIFO or FIFO; in the m4_wrap, do not check which diversion is the topmost one, just check that the stack is balanced at the end. * lib/m4sugar/m4sh.m4 (AS_INIT): We are going to change the base diversion forever--pop the previous diversion before opening the new one; consequently, remove the m4_wrap call. * lib/autotest/general.m4 (AT_INIT): Likewise. * tests/m4sugar.at: Do not use m4_wrap([m4_diversion_pop([..])]), for educational purposes.
Diffstat (limited to 'tests')
-rw-r--r--tests/m4sugar.at12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 843ae066..486f805a 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -62,7 +62,7 @@ AT_DATA_M4SUGAR([script.4s],
m4_defun([cross_warning],
[m4_warn([cross], [cross])])
-m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_divert([0])dnl
m4_warn([obsolete], [obsolete])dnl
cross_warning[]dnl
m4_warn([syntax], [syntax])dnl
@@ -135,7 +135,7 @@ m4_defun([baz],
[m4_require([foo])])
m4_init
-m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_divert([0])dnl
baz
]])
@@ -161,7 +161,7 @@ AT_SETUP([m4@&t@_text_wrap])
# m4-listification.
AT_DATA_M4SUGAR([script.4s],
-[[m4_divert_push([0])m4_wrap([m4_divert_pop([0])])dnl
+[[m4_divert([0])dnl
m4_text_wrap([Short string */], [ ], [/* ], 20)
m4_text_wrap([Much longer string */], [ ], [/* ], 20)
@@ -303,7 +303,7 @@ outer value
AT_DATA_M4SUGAR([script.4s],
[[m4_init
-m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_divert([0])dnl
m4_for([myvar], 1, 3,-1, [ myvar])
]])
@@ -315,7 +315,7 @@ autom4te: m4 failed with exit status: 1
AT_DATA_M4SUGAR([script.4s],
[[m4_init
-m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_divert([0])dnl
m4_for([myvar], 1, 2, 0, [ myvar])
]])
@@ -327,7 +327,7 @@ autom4te: m4 failed with exit status: 1
AT_DATA_M4SUGAR([script.4s],
[[m4_init
-m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_divert([0])dnl
m4_for([myvar], 2, 1, 0, [ myvar])
]])