X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fcontrol%2Fdefine.at;h=7a005fc8059c43c4db40de80da7ca6697e84fd49;hb=7024f0edd9193b70c24fcf76d123b15f00a61180;hp=8f1c8dea8db61b993a663ab5852db9273a0a2fd1;hpb=69bf3f901b0a949cfa957950f55df78d0c86a765;p=pspp diff --git a/tests/language/control/define.at b/tests/language/control/define.at index 8f1c8dea8d..7a005fc805 100644 --- a/tests/language/control/define.at +++ b/tests/language/control/define.at @@ -18,10 +18,12 @@ AT_BANNER([DEFINE]) m4_define([PSPP_CHECK_MACRO_EXPANSION], [AT_SETUP([macro expansion - $1]) + AT_KEYWORDS([m4_bpatsubst([$1], [!], [])]) AT_DATA([define.sps], [$2 DEBUG EXPAND. $3 ]) + AT_CAPTURE_FILE([define.sps]) AT_DATA([expout], [$4 ]) AT_CHECK([pspp --testing-mode define.sps | sed '/^$/d'], [$6], [expout]) @@ -351,4 +353,40 @@ PSPP_CHECK_MACRO_EXPANSION([default keyword arguments], [!k arg1=x. !k], [k(x) -k(a b c)]) \ No newline at end of file +k(a b c)]) + +dnl Keep this test in sync with the examples for !BLANKS in the manual. +PSPP_CHECK_MACRO_EXPANSION([!BLANKS], + [DEFINE !b() +!BLANKS(0). +!QUOTE(!BLANKS(0)). +!BLANKS(1). +!QUOTE(!BLANKS(1)). +!BLANKS(2). +!QUOTE(!BLANKS(2)). +!BLANKS(5). +!QUOTE(!BLANKS(5)). +!ENDDEFINE], + [!b.], + [. +''. + . +' '. + . +' '. + . +' '.]) + +dnl Keep this test in sync with the examples for !CONCAT in the manual. +PSPP_CHECK_MACRO_EXPANSION([!CONCAT], + [DEFINE !c() +!CONCAT(x, y). +!CONCAT('x', 'y'). +!CONCAT(12, 34). +!CONCAT(!NULL, 123). +!ENDDEFINE], + [!c.], + [xy. +xy. +1234. +123.])