lexer: New functions lex_spec_missing(), lex_spec_only_once().
[pspp-builds.git] / tests / language / control / do-if.at
1 AT_BANNER([DO IF])
2
3 AT_SETUP([DO IF])
4 (for a in 0 1 ' '; do
5     for b in 0 1 ' '; do
6         for c in 0 1 ' '; do
7             for d in 0 1 ' '; do
8                 abcd=$a$b$c$d
9                 echo "$abcd" 1>&3
10                 if test "$a" = "1"; then
11                     echo " $abcd A"
12                 elif test "$a" = " "; then
13                     :
14                 elif test "$b" = "1"; then
15                     echo " $abcd B"
16                 elif test "$b" = " "; then
17                     :
18                 elif test "$c" = "1"; then
19                     echo " $abcd C"
20                 elif test "$c" = " "; then
21                     :
22                 elif test "$d" = "1"; then
23                     echo " $abcd D"
24                 elif test "$d" = " "; then
25                     :
26                 else
27                     echo " $abcd E"
28                 fi
29             done
30         done
31     done
32 done) >expout 3>do-if.txt || exit 99
33 AT_DATA([do-if.sps], [dnl
34 DATA LIST FILE="do-if.txt"/A B C D 1-4 ABCD 1-4 (A).
35 DO IF A.
36 PRINT OUTFILE="do-if.out"/ABCD 'A'.
37 ELSE IF B.
38 PRINT OUTFILE="do-if.out"/ABCD 'B'.
39 ELSE IF C.
40 PRINT OUTFILE="do-if.out"/ABCD 'C'.
41 ELSE IF D.
42 PRINT OUTFILE="do-if.out"/ABCD 'D'.
43 ELSE.
44 PRINT OUTFILE="do-if.out"/ABCD 'E'.
45 END IF.
46 EXECUTE.
47 ])
48 AT_CHECK([pspp do-if.sps], [0], [ignore])
49 AT_CHECK([cat do-if.out], [0], [expout])
50 AT_CLEANUP