X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fdata-io%2Fdata-list.at;h=ee576ae474451670fde52863d16de6bc96951422;hb=be14f24529e64b7d1dad2b148b4d254da38160de;hp=b7584116873efcf9a19c25972883819bbcf6a82c;hpb=3eabe1e0eed831505e878deb41a283f489a33f2d;p=pspp diff --git a/tests/language/data-io/data-list.at b/tests/language/data-io/data-list.at index b758411687..ee576ae474 100644 --- a/tests/language/data-io/data-list.at +++ b/tests/language/data-io/data-list.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([DATA LIST]) AT_SETUP([DATA LIST LIST with empty fields]) @@ -333,8 +349,8 @@ data-list.sps:4: warning: Missing delimiter following quoted string. Table: Data List s -y @&t@ -z @&t@ +y +z ]) AT_CLEANUP @@ -384,3 +400,36 @@ Case Number,A ]) AT_CLEANUP + + +AT_SETUP([DATA LIST - Negative SKIP]) +AT_DATA([data-list.sps], [dnl +DATA LIST LIST FILE='f.in' NOTABLE SKIP=-1 /a b c d. + +EXECUTE. +]) + +AT_CHECK([pspp -O format=csv data-list.sps], [1], [dnl +data-list.sps:1.41-1.42: error: DATA LIST: Syntax error at `-1': Expected non-negative integer for SKIP. + +data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. +]) + +AT_CLEANUP + + +AT_SETUP([DATA LIST - Negative RECORDS]) +AT_DATA([data-list.sps], [dnl +DATA LIST LIST FILE='f.in' NOTABLE RECORDS=-1 /a b c d. + +EXECUTE. +]) + +AT_CHECK([pspp -O format=csv data-list.sps], [1], [dnl +data-list.sps:1.44-1.45: error: DATA LIST: Syntax error at `-1': Expected non-negative integer for RECORDS. + +data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. +]) + +AT_CLEANUP +