From: Ben Pfaff Date: Mon, 28 Aug 2017 15:38:07 +0000 (-0700) Subject: tests: Add pspp-convert.at to Git. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=ecad37996f533d5cd8348ad68659470e821f5ebd tests: Add pspp-convert.at to Git. This was accidentally omitted from the repository. --- diff --git a/tests/utilities/pspp-convert.at b/tests/utilities/pspp-convert.at new file mode 100644 index 0000000000..20de9499e5 --- /dev/null +++ b/tests/utilities/pspp-convert.at @@ -0,0 +1,19 @@ +AT_BANNER([pspp-convert]) + +AT_SETUP([pspp-convert crash when output cannot be opened]) +dnl Create a small .sav file. +AT_DATA([sysfile.sps], [dnl +DATA LIST NOTABLE/x 1. +BEGIN DATA. +5 +END DATA. +SAVE OUTFILE='data.sav'. +]) +AT_CHECK([pspp -O format=csv sysfile.sps]) + +AT_CHECK([pspp-convert data.sav nonexistent/output.sav], [1], [], [stderr]) +AT_CHECK([grep '[[eE]]rror opening' stderr], [0], [dnl +Error opening `nonexistent/output.sav' for writing as a system file: No such file or directory. +pspp-convert: nonexistent/output.sav: error opening output file +]) +AT_CLEANUP