SORT VARIABLES: Improve error messages.
[pspp] / tests / language / control / loop.at
index 37125d93990c0b74b5d97373060dfadddadc4259..23ab6b5b1873cd556f25c7661b70696ae9a6a195 100644 (file)
@@ -303,14 +303,21 @@ END LOOP !.
 LOOP.
 ])
 AT_CHECK([pspp loop.sps], 1, [dnl
-loop.sps:2: error: BREAK: This command cannot appear outside LOOP...END LOOP.
-
-loop.sps:3: error: END LOOP: This command cannot appear outside LOOP...END
+loop.sps:2.1-2.5: error: BREAK: This command cannot appear outside LOOP...END
 LOOP.
+    2 | BREAK.
+      | ^~~~~
+
+loop.sps:3.1-3.8: error: END LOOP: This command cannot appear outside LOOP...
+END LOOP.
+    3 | END LOOP.
+      | ^~~~~~~~
 
-loop.sps:5: error: LOOP: Only one index clause may be specified.
+loop.sps:5.15: error: LOOP: Only one index clause may be specified.
+    5 | LOOP A=1 TO 5 B=1 TO 5.
+      |               ^
 
-loop.sps:7.6: error: LOOP: Syntax error.
+loop.sps:7.6: error: LOOP: Syntax error expecting identifier.
     7 | LOOP 5.
       |      ^
 
@@ -342,7 +349,7 @@ loop.sps:21.1-21.9: error: LOOP: Required subcommand TO was not specified.
    21 | LOOP A=1.
       | ^~~~~~~~~
 
-loop.sps:23.6: error: LOOP: Syntax error.
+loop.sps:23.6: error: LOOP: Syntax error expecting identifier.
    23 | LOOP !.
       |      ^
 
@@ -362,6 +369,6 @@ loop.sps:36.10: error: LOOP: Syntax error expecting end of command.
    36 | END LOOP !.
       |          ^
 
-error: LOOP: At end of input: Syntax error.
+error: LOOP: At end of input: Syntax error expecting END LOOP.
 ])
 AT_CLEANUP
\ No newline at end of file