X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fdata-io%2Fprint.at;h=02c18c619f2e3513268291e9c283ec2ea758be87;hb=86454c8ab63804d02cb4f08e8b5e45299b8eb810;hp=71259e0c68dc8566c8b84824c948f4c8d7647a07;hpb=9ade26c8349b4434008c46cf09bc7473ec743972;p=pspp diff --git a/tests/language/data-io/print.at b/tests/language/data-io/print.at index 71259e0c68..02c18c619f 100644 --- a/tests/language/data-io/print.at +++ b/tests/language/data-io/print.at @@ -1,3 +1,19 @@ +dnl PSPP - a program for statistical analysis. +dnl Copyright (C) 2017 Free Software Foundation, Inc. +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 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 You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl AT_BANNER([PRINT and WRITE]) dnl These tests check unusual aspects of the PRINT and WRITE @@ -302,3 +318,36 @@ AT_CHECK([cat foo2.out], [0], [dnl ls -l foo.out foo2.out AT_CHECK([test -c foo.out]) AT_CLEANUP + +AT_SETUP([PRINT with special line ends]) +AT_DATA([print.sps], [dnl +FILE HANDLE lf /NAME='lf.txt' /ENDS=LF. +FILE HANDLE crlf /NAME='crlf.txt' /ENDS=CRLF. +DATA LIST NOTABLE /x 1. +BEGIN DATA. +1 +2 +3 +4 +5 +END DATA. +PRINT OUTFILE=lf/x. +PRINT OUTFILE=crlf/x. +EXECUTE. +]) +AT_CHECK([pspp -O format=csv print.sps]) +AT_CHECK([cat lf.txt], [0], [dnl + 1 @&t@ + 2 @&t@ + 3 @&t@ + 4 @&t@ + 5 @&t@ +]) +AT_CHECK([tr '\r' R < crlf.txt], [0], [dnl + 1 R + 2 R + 3 R + 4 R + 5 R +]) +AT_CLEANUP