1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([IMPORT and EXPORT])
19 AT_SETUP([IMPORT and EXPORT])
20 AT_DATA([import-export.sps], [dnl
21 DATA LIST LIST NOTABLE /X Y.
28 EXPORT /OUTFILE='wiz.por'.
29 IMPORT /FILE='wiz.por'.
33 AT_CHECK([pspp -o pspp.csv import-export.sps])
34 AT_CHECK([cat pspp.csv], [0], [dnl
45 # UNSELECTED=DELETE used to cause a crash if there was actually a
47 AT_SETUP([SAVE -- delete unselected])
48 AT_DATA([data.txt], [dnl
49 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0
50 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1
51 1.625,'0 12:00',,,xyzzy,1
53 AT_DATA([save.pspp], [dnl
55 DATA LIST LIST NOTABLE FILE="data.txt"
56 /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8)
58 MISSING VALUES number(0) time('0 12:00') string('xyzzy').
60 SAVE /OUTFILE="data.sav" /UNSELECTED=DELETE.
62 AT_DATA([get.pspp], [dnl
66 AT_CHECK([pspp -O format=csv save.pspp])
67 AT_CHECK([pspp -O format=csv get.pspp], [0], [dnl
69 number,time,date,datetime,string,filter
70 . ,-0 05:17,10/31/2010,09-APR-2008 09:29:00,xxx,1
71 1.625,0 12:00:00,.,.,xyzzy,1