m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/tests/freeze.at,v


From: Eric Blake
Subject: Changes to m4/tests/freeze.at,v
Date: Fri, 28 Jul 2006 16:41:30 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/07/28 16:41:29

Index: tests/freeze.at
===================================================================
RCS file: /sources/m4/m4/tests/freeze.at,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- tests/freeze.at     28 Jul 2006 14:06:11 -0000      1.3
+++ tests/freeze.at     28 Jul 2006 16:41:29 -0000      1.4
@@ -106,6 +106,59 @@
 AT_CLEANUP
 
 
+## -------------------------- ##
+## Reloading unknown builtins ##
+## -------------------------- ##
+
+AT_SETUP([reloading unknown builtin])
+AT_KEYWORDS([frozen])
+
+AT_DATA([[empty.m4]])
+
+# Freeze default state.
+AT_CHECK_M4([-F frozen.m4f empty.m4])
+
+# Add an unknown builtin.
+echo 'F1,1' >> frozen.m4f
+echo 'ab' >> frozen.m4f
+
+AT_DATA([[input.m4]],
+[[dnl The macro is defined; checking this is safe
+ifdef(`a', `yes', `no')
+dnl Grabbing the definition must warn; and the copy is the empty string
+define(`c', defn(`a'))
+dnl Invoking the macro directly must warn
+a
+dnl Invoking it indirectly must warn
+indir(`a')
+dnl The copy is a text string, not a placeholder
+c
+dnl Since it is defined, it must have a definition
+dumpdef(`a', `c')
+dnl Deleting it is safe
+popdef(`a')
+a
+]])
+
+AT_CHECK_M4([-R frozen.m4f input.m4], 0,
+[[yes
+
+
+
+
+
+
+a
+]],
+[[m4: input.m4: 4: Warning: a: builtin `b' requested by frozen file not found
+m4: input.m4: 6: Warning: a: builtin `b' requested by frozen file not found
+m4: input.m4: 8: Warning: a: builtin `b' requested by frozen file not found
+a:     <placeholder for b>
+c:     `'
+]])
+
+AT_CLEANUP
+
 ## ---------------------- ##
 ## Freezing regexp syntax ##
 ## ---------------------- ##




reply via email to

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