X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fget-data-psql.sh;h=081c79745adb0f2dfe50ae5c8ed6e82b3581bfa1;hb=dfd1972f7bcb550a4fc3b05dbe7e71d12334b0a7;hp=1d8afadaa815f2ece469e7d488845844540f8951;hpb=c9a3c45e44c1c03d13d4eb186e3817bc836f75f8;p=pspp-builds.git diff --git a/tests/command/get-data-psql.sh b/tests/command/get-data-psql.sh index 1d8afada..081c7974 100755 --- a/tests/command/get-data-psql.sh +++ b/tests/command/get-data-psql.sh @@ -206,127 +206,102 @@ $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output 1" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << 'EOF' -1.1 DISPLAY. -+---------------+-------------------------------------------+--------+ -|Variable |Description |Position| -#===============#===========================================#========# -|bool |Format: F8.2 | 1| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|bytea |Format: AHEX2 | 2| -| |Measure: Nominal | | -| |Display Alignment: Left | | -| |Display Width: 1 | | -+---------------+-------------------------------------------+--------+ -|char |Format: A8 | 3| -| |Measure: Nominal | | -| |Display Alignment: Left | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|int8 |Format: F8.2 | 4| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|int2 |Format: F8.2 | 5| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|int4 |Format: F8.2 | 6| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|numeric |Format: E40.6 | 7| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|text |Format: A16 | 8| -| |Measure: Nominal | | -| |Display Alignment: Left | | -| |Display Width: 16 | | -+---------------+-------------------------------------------+--------+ -|oid |Format: F8.2 | 9| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|float4 |Format: F8.2 | 10| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|float8 |Format: F8.2 | 11| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|money |Format: DOLLAR8.2 | 12| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|pbchar |Format: A8 | 13| -| |Measure: Nominal | | -| |Display Alignment: Left | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|varchar |Format: A8 | 14| -| |Measure: Nominal | | -| |Display Alignment: Left | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|date |Format: DATE11 | 15| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|time |Format: TIME11.0 | 16| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|timestamp |Format: DATETIME22.0 | 17| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|timestamptz |Format: DATETIME22.0 | 18| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|interval |Format: DTIME13.0 | 19| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|interval_months|Format: F3.0 | 20| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|timetz |Format: TIME11.0 | 21| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ -|timetz_zone |Format: F8.2 | 22| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+---------------+-------------------------------------------+--------+ - bool bytea char int8 int2 int4 numeric text oid float4 float8 money pbchar varchar date time timestamp timestamptz interval interval_months timetz timetz_zone --------- ----- -------- -------- -------- -------- ---------------------------------------- ---------------- -------- -------- -------- -------- -------- -------- ----------- ----------- ---------------------- ---------------------- ------------- --------------- ----------- ----------- - .00 30 a .00 .00 .00 -2.560980E+002 this-long-text .00 .00 .00 $.01 a A 01-JAN-2000 0:00:00 08-JAN-1999 04:05:06 08-JAN-1999 12:05:06 0 00:01:00 0 10:09:00 4.00 - . 20 . . . . . . . . . . . . . . . . - 1.00 31 b 1.00 1.00 1.00 6.553500E+004 that-long-text .00 1.00 1.00 $1.23 b B 10-JAN-1963 1:05:02 10-JAN-1963 23:58:00 10-JAN-1963 22:58:00 12 01:03:04 25 1:05:02 -7.00 +diff -c $TEMPDIR/pspp.csv - << 'EOF' +Variable,Description,,Position +bool,Format: F8.2,,1 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +bytea,Format: AHEX2,,2 +,Measure: Nominal,, +,Display Alignment: Left,, +,Display Width: 1,, +char,Format: A8,,3 +,Measure: Nominal,, +,Display Alignment: Left,, +,Display Width: 8,, +int8,Format: F8.2,,4 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +int2,Format: F8.2,,5 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +int4,Format: F8.2,,6 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +numeric,Format: E40.6,,7 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +text,Format: A16,,8 +,Measure: Nominal,, +,Display Alignment: Left,, +,Display Width: 16,, +oid,Format: F8.2,,9 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +float4,Format: F8.2,,10 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +float8,Format: F8.2,,11 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +money,Format: DOLLAR8.2,,12 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +pbchar,Format: A8,,13 +,Measure: Nominal,, +,Display Alignment: Left,, +,Display Width: 8,, +varchar,Format: A8,,14 +,Measure: Nominal,, +,Display Alignment: Left,, +,Display Width: 8,, +date,Format: DATE11,,15 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +time,Format: TIME11.0,,16 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +timestamp,Format: DATETIME22.0,,17 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +timestamptz,Format: DATETIME22.0,,18 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +interval,Format: DTIME13.0,,19 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +interval_months,Format: F3.0,,20 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +timetz,Format: TIME11.0,,21 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +timetz_zone,Format: F8.2,,22 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, + +Table: Data List +bool,bytea,char,int8,int2,int4,numeric,text,oid,float4,float8,money,pbchar,varchar,date,time,timestamp,timestamptz,interval,interval_months,timetz,timetz_zone +.00,30,a ,.00,.00,.00,-2.560980E+002,this-long-text ,.00,.00,.00,$.01,a ,A ,01-JAN-2000,0:00:00,08-JAN-1999 04:05:06,08-JAN-1999 12:05:06,0 00:01:00,0,10:09:00,4.00 +. ,20,,. ,. ,. ,. ,,. ,. ,. ,. ,,,.,.,.,.,.,.,.,. +1.00,31,b ,1.00,1.00,1.00,6.553500E+004,that-long-text ,.00,1.00,1.00,$1.23,b ,B ,10-JAN-1963,1:05:02,10-JAN-1963 23:58:00,10-JAN-1963 22:58:00,12 01:03:04,25,1:05:02,-7.00 EOF if [ $? -ne 0 ] ; then fail ; fi @@ -349,27 +324,20 @@ $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output 2" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << 'EOF' -1.1 DISPLAY. -+--------+-------------------------------------------+--------+ -|Variable|Description |Position| -#========#===========================================#========# -|a |Format: F8.2 | 1| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+--------+-------------------------------------------+--------+ -|b |Format: DATE11 | 2| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+--------+-------------------------------------------+--------+ -|c |Format: E40.2 | 3| -| |Measure: Scale | | -| |Display Alignment: Right | | -| |Display Width: 8 | | -+--------+-------------------------------------------+--------+ +diff -c $TEMPDIR/pspp.csv - << 'EOF' +Variable,Description,,Position +a,Format: F8.2,,1 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +b,Format: DATE11,,2 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, +c,Format: E40.2,,3 +,Measure: Scale,, +,Display Alignment: Right,, +,Display Width: 8,, EOF if [ $? -ne 0 ] ; then fail ; fi @@ -406,24 +374,24 @@ $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output 3" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << 'EOF' - x diff --------- -------- - 1.00 . - 2.00 1.00 - 3.00 1.00 - 4.00 1.00 - 5.00 1.00 - 6.00 1.00 - x diff --------- -------- - 1000.00 1.00 - 999.00 1.00 - 998.00 1.00 - 997.00 1.00 - 996.00 1.00 - 995.00 1.00 +diff -c $TEMPDIR/pspp.csv - << 'EOF' +Table: Data List +x,diff +1.00,. +2.00,1.00 +3.00,1.00 +4.00,1.00 +5.00,1.00 +6.00,1.00 + +Table: Data List +x,diff +1000.00,1.00 +999.00,1.00 +998.00,1.00 +997.00,1.00 +996.00,1.00 +995.00,1.00 EOF if [ $? -ne 0 ] ; then fail ; fi