Smake: Add unicase/u8-totitle module.
[pspp] / tests / language / data-io / get-data-psql.at
index 923c9bd3c7637ec512e81b9c038cbfebd7607e9f..31682ff06089f96ae2069499cbe11df9e28ad0d4 100644 (file)
@@ -1,22 +1,22 @@
 dnl PSPP - a program for statistical analysis.
 dnl Copyright (C) 2017 Free Software Foundation, Inc.
-dnl 
+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
 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
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dnl
 AT_BANNER([GET DATA /TYPE=PSQL])
 
-m4_define([INIT_PSQL], 
+m4_define([INIT_PSQL],
   [AT_SKIP_IF([test "$PSQL_SUPPORT" = no])
    PGDATA=`pwd`/cluster
    export PGDATA
@@ -30,7 +30,7 @@ m4_define([INIT_PSQL],
    trap 'CLEANUP_PSQL' 0
    AT_CHECK([PATH=$PG_PATH:$PATH createdb -h "$socket_dir" -p $PG_PORT $PG_DBASE],
       [0], [ignore], [ignore])
-   AT_DATA([populate.sql], 
+   AT_DATA([populate.sql],
      [CREATE TABLE empty (a int, b date, c numeric(23, 4));
 
       -- a largeish table to check big queries work ok.
@@ -58,7 +58,7 @@ m4_define([INIT_PSQL],
        timestamp     timestamp           ,
        timestamptz   timestamptz         ,
        interval      interval            ,
-       timetz        timetz              
+       timetz        timetz
       );
 
       INSERT INTO thing VALUES (
@@ -136,7 +136,7 @@ m4_define([INIT_PSQL],
    # normal $PATH works fine though.
    if (PATH=$PG_PATH:$PATH psql -V) >/dev/null 2>&1; then
        psql () {
-           PATH=$PG_PATH:$PATH command psql "$@"
+           PATH=$PG_PATH:$PATH command psql "$$@@"
        }
    fi
    AT_CHECK([psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < populate.sql],
@@ -150,7 +150,7 @@ INIT_PSQL
 
 dnl Test with an ordinary query.
 AT_CHECK([cat > ordinary-query.sps <<EOF
-GET DATA /TYPE=psql 
+GET DATA /TYPE=psql
        /CONNECT="host=$socket_dir port=$PGPORT dbname=$PG_DBASE"
        /UNENCRYPTED
        /SQL="select * from thing".
@@ -189,14 +189,14 @@ timetz_zone,22,,Scale,Input,8,Right,F8.2,F8.2,
 
 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
+.00,30,a,.00,.00,.00,-2.560980E+002,this-long-text,.00,.00,.00,$.01,a,A,01-JAN-2000,00:00:00,08-JAN-1999 04:05:06,08-JAN-1999 12:05:06,0 00:01:00,0,10:09:00,4.00
 .  ,,,.  ,.  ,.  ,.          ,,.  ,.  ,.  ,.  ,,,.,.,.,.,.,.,.,.  @&t@
-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
+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,01:05:02,10-JAN-1963 23:58:00,10-JAN-1963 22:58:00,12 01:03:04,25,01:05:02,-7.00
 ])
 
 dnl Test query with empty result set.
 AT_CHECK([cat > empty-result.sps <<EOF
-GET DATA /TYPE=psql 
+GET DATA /TYPE=psql
        /CONNECT="host=$socket_dir port=$PGPORT dbname=$PG_DBASE"
        /UNENCRYPTED
        /SQL="select * from empty".
@@ -217,7 +217,7 @@ c,3,,Scale,Input,8,Right,E40.2,E40.2,
 
 dnl Test query with large result set.
 AT_CHECK([cat > large-result.sps <<EOF
-GET DATA /TYPE=psql 
+GET DATA /TYPE=psql
        /CONNECT="host=$socket_dir port=$PGPORT dbname=$PG_DBASE"
        /UNENCRYPTED
        /SQL="select * from large".
@@ -277,7 +277,7 @@ AT_CHECK([psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < all-null-string.sql],
   [0], [ignore])
 AT_CAPTURE_FILE([get-data.sps])
 AT_CHECK([cat > get-data.sps <<EOF
-GET DATA /TYPE=psql 
+GET DATA /TYPE=psql
        /CONNECT="host=$socket_dir port=$PGPORT dbname=$PG_DBASE"
        /UNENCRYPTED
        /SQL="select * from foo".