[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/tests/builtins.at,v
From: |
Eric Blake |
Subject: |
Changes to m4/tests/builtins.at,v |
Date: |
Thu, 12 Oct 2006 21:14:53 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/10/12 21:14:50
Index: tests/builtins.at
===================================================================
RCS file: /sources/m4/m4/tests/builtins.at,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- tests/builtins.at 10 Oct 2006 12:47:23 -0000 1.23
+++ tests/builtins.at 12 Oct 2006 21:14:50 -0000 1.24
@@ -19,6 +19,58 @@
AT_BANNER([Torturing builtins.])
+## -------- ##
+## __file__ ##
+## -------- ##
+
+AT_SETUP([__@&address@hidden)
+
+dnl Unfortunately, AT_DATA does not make it easy to create files without
+dnl a trailing newline.
+[echo $ECHO_N "__line"__:__"file__$ECHO_C"] > nested
+AT_DATA([outer],
+[[__file__:__line__
+include(`nested')
+__file__:__line__
+]])
+
+dnl Make sure line numbers are consistent, even if include file does not
+dnl end with a newline
+AT_CHECK_M4([outer], [0],
+[[outer:1
+1:nested
+outer:3
+]])
+
+AT_CLEANUP
+
+
+## -------- ##
+## __line__ ##
+## -------- ##
+
+AT_SETUP([__@&address@hidden)
+
+dnl Unfortunately, AT_DATA does not make it easy to create files without
+dnl a trailing newline.
+[echo $ECHO_N "__file"__:__"line__$ECHO_C"] > nested
+AT_DATA([outer],
+[[__file__:__line__
+include(`nested')
+__file__:__line__
+]])
+
+dnl Make sure line numbers are consistent, even if include file does not
+dnl end with a newline
+AT_CHECK_M4([outer], [0],
+[[outer:1
+nested:1
+outer:3
+]])
+
+AT_CLEANUP
+
+
## ----- ##
## debug ##
## ----- ##
@@ -112,6 +164,37 @@
AT_CLEANUP
+## --- ##
+## dnl ##
+## --- ##
+
+AT_SETUP([d@&address@hidden)
+
+dnl Unfortunately, AT_DATA does not make it easy to create files without
+dnl a trailing newline.
+[echo $ECHO_N "__file"__:__"line__ d""nl ignored$ECHO_C"] > nested
+AT_DATA([outer],
+[[__file__:__line__
+include(`nested') still ignored
+__file__:__line__
+define(`foo', `dnl
+__file__:__line__ include(`nested') ignored
+dnl')dnl
+foo ignored
+__file__:__line__
+]])
+
+dnl Make sure line numbers are consistent, even if include file does not
+dnl end with a newline
+AT_CHECK_M4([outer], [0],
+[[outer:1
+nested:1 outer:3
+outer:7 nested:1 outer:8
+]])
+
+AT_CLEANUP
+
+
## ------- ##
## esyscmd ##
## ------- ##
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/04
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/05
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/06
- Changes to m4/tests/builtins.at,v,
Eric Blake <=
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/20
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/21
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/26
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/26
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/27
- Changes to m4/tests/builtins.at,v, Eric Blake, 2006/10/31