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([__@&[EMAIL PROTECTED]) + +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([__@&[EMAIL PROTECTED]) + +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@&[EMAIL PROTECTED]) + +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 ## ## ------- ##