diff options
author | Eric Blake <eblake@redhat.com> | 2010-03-16 18:49:07 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-07-02 12:10:36 -0600 |
commit | ac6824d442301dbbfcd69f7a9160a5aa13396a7f (patch) | |
tree | 6cc83f51e6ea2bdc8393e33dc7e628b810e883ec /tests/m4sh.at | |
parent | e960d7be02c5d2e33b4b631359b5cb98c87faafa (diff) | |
download | autoconf-ac6824d442301dbbfcd69f7a9160a5aa13396a7f.tar.gz |
Add tests for AS_BOX.
* tests/m4sugar.at (m4@&t@_text_box): New test.
* tests/m4sh.at (AS@&t@_BOX): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_text_box): Support comma.
* doc/autoconf.texi (Text processing Macros) <m4_text_box>:
Document further limitations.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/m4sh.at')
-rw-r--r-- | tests/m4sh.at | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/tests/m4sh.at b/tests/m4sh.at index 1e6eb596..f5ea7e20 100644 --- a/tests/m4sh.at +++ b/tests/m4sh.at @@ -124,9 +124,51 @@ AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP -## ------------- ## -## AS_BASENAME. ## -## ------------- ## +## -------- ## +## AS_BOX. ## +## -------- ## + +# Output a framed one-line message. +AT_SETUP([AS@&t@_BOX]) +AT_KEYWORDS([m4sh]) + +AT_DATA_M4SH([script.as], +[[AS_INIT +echo +AS_BOX([Send a simple message, to foobar@example.com]) +AS_BOX([Send a simple message, to foobar@example.com], [$]) +m4_define([msg], [$complex]) +complex='Not quite as simple |$[1]' +AS_BOX([msg]) +AS_BOX([msg], [,]) +AS_EXIT(0) +]]) + +AT_CHECK_M4SH +AT_CHECK([sed -n '/ -\{44\} /,/ -\{44\} /p' script ]dnl +[| sed '1 s/.*## -/## -/; 3 s/- ##.*/- ##/'], [], +[[## -------------------------------------------- ## +## Send a simple message, to foobar@example.com ## +## -------------------------------------------- ## +]]) + +AT_CHECK([$CONFIG_SHELL ./script], [], [[ +## -------------------------------------------- ## +## Send a simple message, to foobar@example.com ## +## -------------------------------------------- ## +## $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ## +## Send a simple message, to foobar@example.com ## +## $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ## +## ----------------------- ## +## Not quite as simple |$1 ## +## ----------------------- ## +## ,,,,,,,,,,,,,,,,,,,,,,, ## +## Not quite as simple |$1 ## +## ,,,,,,,,,,,,,,,,,,,,,,, ## +]]) + +AT_CLEANUP + # Strip path from file. AT_SETUP([AS@&t@_BASENAME]) |