X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fdictionary%2Fmrsets.at;h=b72803c19e509279841ae413cd55c6c0d91acba4;hb=f5d1ac814687386b4cd6af9fa9e6f2f98913aa7d;hp=08256768b3a525a3f4de4ecc14504c2f5d29096b;hpb=691a034d7f2139076fa012739dffd40ef5db4a9b;p=pspp diff --git a/tests/language/dictionary/mrsets.at b/tests/language/dictionary/mrsets.at index 08256768b3..b72803c19e 100644 --- a/tests/language/dictionary/mrsets.at +++ b/tests/language/dictionary/mrsets.at @@ -1,19 +1,20 @@ dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. -dnl +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 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 dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . -dnl AT_BANNER([MRSETS]) +dnl +AT_BANNER([MRSETS]) m4_define([DEFINE_MRSETS_DATA], [DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). @@ -81,56 +82,31 @@ mrsets.sps:38: warning: MRSETS: MDGROUP subcommand for group $d specifies LABELS "mrsets.sps:42: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but a and c (and possibly others) in multiple category group $f have different value labels for value b." ]) -m4_define([MRSETS_DISPLAY_OUTPUT], - [Table: Multiple Response Sets -Name,Variables,Details -$a,"w +m4_define([MRSETS_DISPLAY_OUTPUT], [dnl +Table: Multiple Response Sets +Name,Label,Encoding,Counted Value,Member Variables +$a,First multiple dichotomy group,Dichotomies,5,"w x y -z -","Multiple dichotomy set -Label: First multiple dichotomy group -Label source: Provided by user -Counted value: 5 -Category label source: Variable labels -" -$b,"z -y -","Multiple dichotomy set -Counted value: 123 -Category label source: Value labels of counted value -" -$c,"w +z" +$b,,Dichotomies,123,"z +y" +$c,duplicate variable label,Dichotomies,1,"w x y -z -","Multiple dichotomy set -Label: duplicate variable label -Label source: First variable label among variables -Counted value: 1 -Category label source: Value labels of counted value -" -$d,"a +z" +$d,,Dichotomies,c,"a b c -d -","Multiple dichotomy set -Counted value: `c' -Category label source: Variable labels -" -$e,"w +d" +$e,First multiple category group,Categories,,"w x y -z -","Multiple category set -Label: First multiple category group -" -$f,"a +z" +$f,,Categories,,"a b c -d -","Multiple category set -" +d" ]) AT_SETUP([MRSETS add, display, delete]) @@ -144,61 +120,60 @@ AT_DATA([mrsets.sps], /DELETE NAME=ALL /DISPLAY NAME=ALL. ]]) -AT_CHECK([pspp -O format=csv mrsets.sps], [0], +AT_CHECK([pspp -o - -O format=csv -o mrsets.csv -o mrsets.txt mrsets.sps], [0], [DEFINE_MRSETS_OUTPUT Table: Multiple Response Sets -Name,Variables,Details -$a,"w +Name,Label,Encoding,Counted Value,Member Variables +$a,First multiple dichotomy group,Dichotomies,5,"w x y -z -","Multiple dichotomy set -Label: First multiple dichotomy group -Label source: Provided by user -Counted value: 5 -Category label source: Variable labels -" +z" -MRSETS_DISPLAY_OUTPUT Table: Multiple Response Sets -Name,Variables,Details -$a,"w +Name,Label,Encoding,Counted Value,Member Variables +$a,First multiple dichotomy group,Dichotomies,5,"w +x +y +z" +$b,,Dichotomies,123,"z +y" +$c,duplicate variable label,Dichotomies,1,"w x y -z -","Multiple dichotomy set -Label: First multiple dichotomy group -Label source: Provided by user -Counted value: 5 -Category label source: Variable labels -" -$b,"z +z" +$d,,Dichotomies,c,"a +b +c +d" +$e,First multiple category group,Categories,,"w +x +y +z" +$f,,Categories,,"a +b +c +d" + +Table: Multiple Response Sets +Name,Label,Encoding,Counted Value,Member Variables +$a,First multiple dichotomy group,Dichotomies,5,"w +x y -","Multiple dichotomy set -Counted value: 123 -Category label source: Value labels of counted value -" -$d,"a +z" +$b,,Dichotomies,123,"z +y" +$d,,Dichotomies,c,"a b c -d -","Multiple dichotomy set -Counted value: `c' -Category label source: Variable labels -" -$e,"w +d" +$e,First multiple category group,Categories,,"w x y -z -","Multiple category set -Label: First multiple category group -" -$f,"a +z" +$f,,Categories,,"a b c -d -","Multiple category set -" +d" mrsets.sps:50: note: MRSETS: The active dataset dictionary does not contain any multiple response sets. ]) @@ -223,8 +198,10 @@ AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=x. ]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6: error: MRSETS: x is not a valid name for a multiple response set. Multiple response set names must begin with `$'. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.22: error: MRSETS: x is not a valid name for a multiple response set. Multiple response set names must begin with `$'. + 6 | MRSETS /MCGROUP NAME=x. + | ^" ]) AT_CLEANUP @@ -243,8 +220,10 @@ AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MDGROUP VALUE=1.5. ]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6: error: MRSETS: Numeric VALUE must be an integer. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.23-6.25: error: MRSETS: Numeric VALUE must be an integer. + 6 | MRSETS /MDGROUP VALUE=1.5. + | ^~~" ]) AT_CLEANUP @@ -253,8 +232,10 @@ AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP VARIABLES=a b c. ]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6.32: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from NAME subcommand. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.32: error: MRSETS: Required NAME specification missing from MCGROUP subcommand. + 6 | MRSETS /MCGROUP VARIABLES=a b c. + | ^" ]) AT_CLEANUP @@ -263,8 +244,10 @@ AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=$Mcgroup. ]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6.30: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from VARIABLES subcommand. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.30: error: MRSETS: Required VARIABLES specification missing from MCGROUP subcommand. + 6 | MRSETS /MCGROUP NAME=$Mcgroup. + | ^" ]) AT_CLEANUP @@ -273,10 +256,14 @@ AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y. ]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6: error: MRSETS: a and x are not the same type. All variables in this variable list must be of the same type. x will be omitted from the list. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.45: error: MRSETS: a and x are not the same type. All variables in this variable list must be of the same type. x will be omitted from the list. + 6 | MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y. + | ^" -mrsets.sps:6: error: MRSETS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. +"mrsets.sps:6.47: error: MRSETS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. + 6 | MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y. + | ^" ]) AT_CLEANUP @@ -320,9 +307,13 @@ AT_DATA([mrsets.sps], [MRSETS /DISPLAY NAME=[$x]. MRSETS /DELETE NAME=[$y]. ]]) -AT_CHECK([pspp -O format=csv mrsets.sps], [1], - [mrsets.sps:6: error: MRSETS: No multiple response set named $x. +AT_CHECK([pspp -O format=csv mrsets.sps], [1], [dnl +"mrsets.sps:6.23-6.24: error: MRSETS: No multiple response set named $x. + 6 | MRSETS /DISPLAY NAME=[[$x]]. + | ^~" -mrsets.sps:7: error: MRSETS: No multiple response set named $y. +"mrsets.sps:7.22-7.23: error: MRSETS: No multiple response set named $y. + 7 | MRSETS /DELETE NAME=[[$y]]. + | ^~" ]) AT_CLEANUP