]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Add test for m4_cond.
authorEric Blake <ebb9@byu.net>
Tue, 12 Aug 2008 12:32:23 +0000 (06:32 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 12 Aug 2008 12:32:23 +0000 (06:32 -0600)
* tests/m4sugar.at (m4@&t@_cond): New test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/m4sugar.at

index 4c4cc3add6ca9327244131ebce131cfae62c966e..8c1faa2163230f0366636f4b02abbe3849386b8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-12  Eric Blake  <ebb9@byu.net>
+
+       Add test for m4_cond.
+       * tests/m4sugar.at (m4@&t@_cond): New test.
+       Reported by Ralf Wildenhues.
+
 2008-08-06  Eric Blake  <ebb9@byu.net>
 
        Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]).
index 60910de899b8ac35c05aba190144bd2a0c642c55..b52b833554b8e6d934e4f559fd91b8508d60f1ee 100644 (file)
@@ -191,6 +191,51 @@ autom4te: m4 failed with exit status: 1
 AT_CLEANUP
 
 
+## --------- ##
+## m4_cond.  ##
+## --------- ##
+
+AT_SETUP([m4@&t@_cond])
+
+AT_CHECK_M4SUGAR_TEXT([[m4_define([side], [m4_errprintn([$1])$1])
+m4_cond([side(1)], [1], [a],
+        [side(1)], [1], [b],
+        [side(1)], [2], [c])
+m4_cond([side(2)], [1], [a],
+        [side(2)], [1], [b],
+        [side(2)], [2], [c],
+        [side(2)])
+m4_cond([side(3)], [1], [a],
+        [side(3)], [1], [b],
+        [side(3)], [2], [c],
+        [side(3)])
+m4_cond([a,a], [a,a], [yes], [no])
+m4_cond([[a,a]], [a,a], [yes])
+m4_cond([a,a], [a,b], [yes], [no])
+m4_cond([a,a], [a,b], [yes])
+m4_cond([m4_eval([0xa])])
+]], [[
+a
+c
+3
+yes
+yes
+no
+
+10
+]], [[1
+2
+2
+2
+3
+3
+3
+3
+]])
+
+AT_CLEANUP
+
+
 ## ---------- ##
 ## m4_split.  ##
 ## ---------- ##