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/>.
16 dnl AT_BANNER([IMPORT and EXPORT])
18 AT_SETUP([IMPORT and EXPORT])
19 AT_DATA([import-export.sps], [dnl
20 DATA LIST LIST NOTABLE /X Y.
27 EXPORT /OUTFILE='wiz.por'.
28 IMPORT /FILE='wiz.por'.
32 AT_CHECK([pspp -o pspp.csv import-export.sps])
33 AT_CHECK([cat pspp.csv], [0], [dnl
44 # UNSELECTED=DELETE used to cause a crash if there was actually a
46 AT_SETUP([SAVE -- delete unselected])
47 AT_DATA([data.txt], [dnl
48 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0
49 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1
50 1.625,'0 12:00',,,xyzzy,1
52 AT_DATA([save.pspp], [dnl
54 DATA LIST LIST NOTABLE FILE="data.txt"
55 /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8)
57 MISSING VALUES number(0) time('0 12:00') string('xyzzy').
59 SAVE /OUTFILE="data.sav" /UNSELECTED=DELETE.
61 AT_DATA([get.pspp], [dnl
65 AT_CHECK([pspp -O format=csv save.pspp])
66 AT_CHECK([pspp -O format=csv get.pspp], [0], [dnl
68 number,time,date,datetime,string,filter
69 . ,-0 05:17,10/31/2010,09-APR-2008 09:29:00,xxx ,1
70 1.625,0 12:00:00,.,.,xyzzy ,1