[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Testsuite coverage for __file__ and __line__.
From: |
Ralf Wildenhues |
Subject: |
Testsuite coverage for __file__ and __line__. |
Date: |
Sun, 6 Jun 2010 13:48:05 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
I have a couple more coverage patches lying around for a while, fairly
trivial. OK now or after 2.66?
Thanks,
Ralf
Testsuite coverage for __file__ and __line.
* tests/m4sugar.at (__file__ and __line__): New test.
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 4aa6034..7069309 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -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@&address@hidden@&address@hidden
+m4@&address@hidden@&address@hidden
+script.4s
+]])
+
+AT_CLEANUP
- Testsuite coverage for __file__ and __line__.,
Ralf Wildenhues <=