data-out: Add test for non-ASCII custom currency formats.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 20 Feb 2011 01:30:39 +0000 (17:30 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 20 Feb 2011 01:33:28 +0000 (17:33 -0800)
These now work as I would expect, so add a test to avoid future regression.

tests/data/data-out.at

index 0b8b4fee9d656fb47d6e3a8cdd9ec4d515e749ca..7fcf8b154e52ce2eb0d6e064093a22e791faaee1 100644 (file)
@@ -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.