X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fdata-out.at;h=0f8c6bfabd8daf3e76c52d9d7b5c901224e97582;hb=5f86425ef29d236118667470f2a461818d7e55b2;hp=9a41a3b5fd4cdc1c5dc204d01b6fe0d5ad3fb3f4;hpb=8626dba4b37d9b07d10888daf8cef3a26e5b114c;p=pspp diff --git a/tests/data/data-out.at b/tests/data/data-out.at index 9a41a3b5fd..0f8c6bfabd 100644 --- a/tests/data/data-out.at +++ b/tests/data/data-out.at @@ -25,7 +25,7 @@ print "END FILE.\n"; print "END INPUT PROGRAM.\n"; print "PRINT OUTFILE='output.txt'/EXPR.\n"; -for my $format qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z) { +for my $format (qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z)) { for my $d (0...16) { my ($min_w); if ($format ne 'E') { @@ -218,6 +218,42 @@ sub increment { AT_CHECK([$PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact]) AT_CLEANUP +AT_SETUP([non-ASCII custom currency formats]) +AT_DATA([data-out.sps], [dnl +SET CCA='«,¥,€,»'. +SHOW CCA. +DATA LIST LIST NOTABLE/x. +PRINT/x (F8.2) x (CCA10.2). +EXECUTE. +BEGIN DATA. +1 +-1 +1.5 +-1.5 +.75 +1.5e10 +-1.5e10 +END DATA. +]) +AT_CHECK([pspp -O format=csv data-out.sps], [0], [dnl +"data-out.sps:2: note: SHOW: CCA is «,¥,€,»." + +1.00 ¥1.00€ @&t@ + +-1.00 «¥1.00€» + +1.50 ¥1.50€ @&t@ + +-1.50 «¥1.50€» + +.75 ¥.75€ @&t@ + +1.5E+010 ¥2E+010€ @&t@ + +-2E+010«¥2E+010€» +]) +AT_CLEANUP + AT_SETUP([binary and hexadecimal output]) AT_DATA([binhex-out.sps], [dnl SET ERRORS=NONE. @@ -14009,11 +14045,12 @@ print outfile='month-out.out'/x(month40). execute. ]) AT_CHECK([pspp -O format=csv month-out.sps], [1], [stdout]) -AT_CHECK([sed '/^$/d' stdout | sort | uniq -c], [0], [dnl - 38 error: Month number 0.000000 is not between 1 and 12. - 38 error: Month number 0.500000 is not between 1 and 12. - 38 error: Month number 0.900000 is not between 1 and 12. - 38 error: Month number 13.000000 is not between 1 and 12. +AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0], +[dnl +38 error: Month number 0.000000 is not between 1 and 12. +38 error: Month number 0.500000 is not between 1 and 12. +38 error: Month number 0.900000 is not between 1 and 12. +38 error: Month number 13.000000 is not between 1 and 12. ]) AT_CHECK([cat month-out.out], [0], [dnl . @@ -14924,11 +14961,12 @@ end repeat. execute. ]) AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout]) -AT_CHECK([sed '/^$/d' stdout | sort | uniq -c], [0], [dnl - 39 error: Weekday number 0.000000 is not between 1 and 7. - 39 error: Weekday number 0.500000 is not between 1 and 7. - 39 error: Weekday number 0.900000 is not between 1 and 7. - 39 error: Weekday number 8.000000 is not between 1 and 7. +AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0], +[dnl +39 error: Weekday number 0.000000 is not between 1 and 7. +39 error: Weekday number 0.500000 is not between 1 and 7. +39 error: Weekday number 0.900000 is not between 1 and 7. +39 error: Weekday number 8.000000 is not between 1 and 7. ]) AT_CHECK([cat wkday-out.out], [0], [dnl .