X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fdata-out.at;h=f84e144928e74fbf1ef87eecb6c28fa5b4b71056;hb=8e27b1a0dba7f33b7acb0d8894efe2045b0bb98f;hp=0b8b4fee9d656fb47d6e3a8cdd9ec4d515e749ca;hpb=7466086a5d1e5325d1aa32482c717e349af6b3ea;p=pspp diff --git a/tests/data/data-out.at b/tests/data/data-out.at index 0b8b4fee9d..f84e144928 100644 --- a/tests/data/data-out.at +++ b/tests/data/data-out.at @@ -1,3 +1,19 @@ +dnl PSPP - a program for statistical analysis. +dnl Copyright (C) 2017 Free Software Foundation, Inc. +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl AT_BANNER([data output (data-out)]) AT_SETUP([numeric format output]) @@ -25,7 +41,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') { @@ -46,7 +62,7 @@ print "EXECUTE.\n"; ]]) AT_CHECK([$PERL num-out.pl > num-out.sps]) AT_CHECK([pspp -O format=csv num-out.sps]) -AT_CHECK([inexactify$EXEEXT < output.txt > output.inexact]) +AT_CHECK([inexactify < output.txt > output.inexact]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp]) AT_DATA([num-out-decmp.pl], [[use strict; @@ -218,6 +234,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,7 +14061,7 @@ 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 | sed 's/^[ ]*//']], [0], +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. @@ -14925,7 +14977,7 @@ end repeat. execute. ]) AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout]) -AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0], +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.