[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/tests/macros.at,v
From: |
Eric Blake |
Subject: |
Changes to m4/tests/macros.at,v |
Date: |
Wed, 08 Nov 2006 19:06:02 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/11/08 19:06:01
Index: tests/macros.at
===================================================================
RCS file: /sources/m4/m4/tests/macros.at,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- tests/macros.at 10 Oct 2006 12:47:23 -0000 1.10
+++ tests/macros.at 8 Nov 2006 19:06:01 -0000 1.11
@@ -99,6 +99,41 @@
AT_CLEANUP(freezeme.m4 frozen.m4f)
+## ------------------- ##
+## Command line define ##
+## ------------------- ##
+
+AT_SETUP([Command line define])
+
+dnl Test that -D after last file still affects m4wrap'd text.
+AT_DATA([in1], [[m4wrap(`foo
+')foo
+]])
+AT_DATA([in2], [[foo
+]])
+AT_CHECK_M4([-Dfoo=1 in1 -Dfoo=2 in2 -Dfoo=3], [0],
+[[1
+2
+3
+]])
+
+dnl Test that -D only affects top-most definition.
+AT_DATA([in1], [[define(`foo', `1')pushdef(`foo', `2')dnl
+]])
+AT_DATA([in2], [[foo
+popdef(`foo')foo
+popdef(`foo')foo
+]])
+AT_CHECK_M4([in1 -Dfoo=3 in2], [0],
+[[3
+1
+foo
+]])
+
+AT_CLEANUP
+
+
+
## ---------------- ##
## pushdef/popdef. ##
## ---------------- ##
- Changes to m4/tests/macros.at,v,
Eric Blake <=