Assorted improvements to diagnostics.
[pspp] / tests / language / data-io / inpt-pgm.at
index 0e93ed654a042cc5795acfd827ea5d659b126c6f..a0054588dad8dfd5d24993daca36d7f068e6f71b 100644 (file)
@@ -28,7 +28,9 @@ END DATA.
 END INPUT PROGRAM.
 ])
 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
-input-program.sps:3: error: BEGIN DATA: BEGIN DATA is not allowed inside INPUT PROGRAM.
+"input-program.sps:3.1-3.10: error: BEGIN DATA: BEGIN DATA is not allowed inside INPUT PROGRAM.
+    3 | BEGIN DATA
+      | ^~~~~~~~~~"
 ])
 AT_CLEANUP
 
@@ -44,7 +46,7 @@ END INPUT PROGRAM.
 DESCRIPTIVES x.
 ])
 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
-error: DESCRIPTIVES: Syntax error at end of input: expecting BEGIN.
+error: DESCRIPTIVES: At end of input: Syntax error expecting BEGIN.
 ])
 AT_CLEANUP
 
@@ -57,9 +59,14 @@ END INPUT PROGRAM.
 EXECUTE.
 ])
 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
-input-program.sps:3: error: INPUT PROGRAM: Input program must contain DATA LIST or END FILE.
+"input-program.sps:1.1-3.17: error: INPUT PROGRAM: Input program does not contain DATA LIST or END FILE.
+    1 | INPUT PROGRAM.
+    2 | STRING firstname lastname (a24) / address (a80).
+    3 | END INPUT PROGRAM."
 
-input-program.sps:4: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined.
+"input-program.sps:4.1-4.7: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined.
+    4 | EXECUTE.
+      | ^~~~~~~"
 ])
 AT_CLEANUP
 
@@ -338,7 +345,10 @@ END FILE.
 END INPUT PROGRAM.
 ])
 AT_CHECK([pspp input-program.sps], 1, [dnl
-input-program.sps:3: error: INPUT PROGRAM: Input program did not create any
-variables.
+input-program.sps:1.1-3.17: error: INPUT PROGRAM: Input program did not create
+any variables.
+    1 | INPUT PROGRAM.
+    2 | END FILE.
+    3 | END INPUT PROGRAM.
 ])
 AT_CLEANUP
\ No newline at end of file