X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Flanguage%2Futilities%2Finsert.at;h=8ae9f3eb5196cb2744efd00e26a41b9ab4282392;hb=d506910e4bc69028c6328d15c005667ad2a0d881;hp=8eaa72f7262e3f387d366901b2842035409371de;hpb=b401615e6db40bf74394839b96600afe3a868a95;p=pspp diff --git a/tests/language/utilities/insert.at b/tests/language/utilities/insert.at index 8eaa72f726..8ae9f3eb51 100644 --- a/tests/language/utilities/insert.at +++ b/tests/language/utilities/insert.at @@ -158,3 +158,39 @@ insert.sps:2: error: INSERT: Can't find `nonexistent' in include file search pat insert.sps:6: error: LIST: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP + + +dnl A test to check the INCLUDE command complete with the +dnl syntax and function of the ENCODING subcommand. +AT_SETUP([INCLUDE full check]) +AT_DATA([two-utf8.sps], [dnl +echo 'Äpfelfölfaß'. +]) + +AT_DATA([include.sps], [dnl +echo 'ONE'. + +include FILE='two-latin1.sps' ENCODING='ISO_8859-1'. +]) + +AT_CHECK([iconv -f UTF-8 -t iso-8859-1 two-utf8.sps > two-latin1.sps], [0], []) + +AT_CHECK([pspp -O format=csv include.sps], [0], [dnl +ONE + +Äpfelfölfaß +]) +AT_CLEANUP + + + + +dnl Test for a bug where insert crashed on an unterminated string input +AT_SETUP([INSERT unterminated string]) + +AT_DATA([insert.sps], [INSERT FILE=7bar.sps' CD=NO. +]) + +AT_CHECK([pspp -O format=csv insert.sps], [1], [ignore]) + +AT_CLEANUP