]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Testsuite coverage for __file__ and __line__.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Jun 2010 04:50:45 +0000 (06:50 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Jun 2010 04:50:45 +0000 (06:50 +0200)
* tests/m4sugar.at (__file__ and __line__): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/m4sugar.at

index ad07b9d6c0ab75348f0d8fd941a4023fc8ca1cfb..79ce828defc3a8836f5acb828c2feb1101a7b62a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-06-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Testsuite coverage for __file__ and __line__.
+       * tests/m4sugar.at (__file__ and __line__): New test.
+
        Testsuite coverage for AC_CACHE_VAL and caching semantics.
        * tests/base.at (AC_CACHE_CHECK): Extend test.
        (AC_CACHE_LOAD): New test.
index 4aa60340e1840fbd0388cd0caadc4b86ea0c7347..70693098edbed55bac38ef36da676675fcc4bcc6 100644 (file)
@@ -2075,3 +2075,30 @@ m4_count(m4_shift(m4_set_intersection([a], [b])))
 ]])
 
 AT_CLEANUP
+
+
+## ---------------------- ##
+## __file__ and __line__. ##
+## ---------------------- ##
+
+AT_SETUP([[__file__ and __line__]])
+
+# Check that __file__ and __line__ work.
+# Check that m4__file__ and m4__line__ are not defined
+# (and get them to pass by the undefined-macro check).
+# Try to not assume too much about AT_CHECK_M4SUGAR_TEXT.
+AT_CHECK_M4SUGAR_TEXT([[dnl
+m4_pattern_allow([m4__file__])dnl
+m4_pattern_allow([m4__line__])dnl
+m4__file__
+m4__line__
+__file__
+m4_define([first], __line__)dnl
+m4_define([second], __line__)dnl
+m4_assert(first + 1 == second)dnl
+]], [[m4@&t@__@&t@file__
+m4@&t@__@&t@line__
+script.4s
+]])
+
+AT_CLEANUP