From: Ben Pfaff Date: Thu, 10 Jun 2021 05:32:11 +0000 (-0700) Subject: Add test for !LENGTH. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=aaf08d6e2852ba7ff5a59baf4a31e36abc89203d Add test for !LENGTH. --- diff --git a/tests/language/control/define.at b/tests/language/control/define.at index 0d4ef96b82..c192beee05 100644 --- a/tests/language/control/define.at +++ b/tests/language/control/define.at @@ -391,4 +391,35 @@ xy. 1234. 123.]) -dnl +dnl Keep this test in sync with the examples for !LENGTH in the manual. +PSPP_CHECK_MACRO_EXPANSION([!LENGTH], + [DEFINE !l() +!LENGTH(123). +!LENGTH(123.00). +!LENGTH( 123 ). +!LENGTH("123"). +!LENGTH(xyzzy). +!LENGTH("xyzzy"). +!LENGTH("xy""zzy"). +!LENGTH(!UNQUOTE("xyzzy")). +!LENGTH(!UNQUOTE("xy""zzy")). +!LENGTH(!NULL). +!ENDDEFINE. +DEFINE !la(!positional !enclose('(',')')) +!LENGTH(!1). +!ENDDEFINE.], + [!l. +!la(a b c). +!la().], + [3. +6. +3. +5. +5. +7. +9. +5. +6. +0. +5. +0.])