tests: Add pspp-convert.at to Git.
[pspp] / tests / utilities / pspp-convert.at
1 AT_BANNER([pspp-convert])
2
3 AT_SETUP([pspp-convert crash when output cannot be opened])
4 dnl Create a small .sav file.
5 AT_DATA([sysfile.sps], [dnl
6 DATA LIST NOTABLE/x 1.
7 BEGIN DATA.
8 5
9 END DATA.
10 SAVE OUTFILE='data.sav'.
11 ])
12 AT_CHECK([pspp -O format=csv sysfile.sps])
13
14 AT_CHECK([pspp-convert data.sav nonexistent/output.sav], [1], [], [stderr])
15 AT_CHECK([grep '[[eE]]rror opening' stderr], [0], [dnl
16 Error opening `nonexistent/output.sav' for writing as a system file: No such file or directory.
17 pspp-convert: nonexistent/output.sav: error opening output file
18 ])
19 AT_CLEANUP