From 3838b041ea9a749d3a0d604f62f7d9523f91f3d8 Mon Sep 17 00:00:00 2001
From: John Darrington <john@darrington.wattle.id.au>
Date: Sat, 13 Dec 2003 08:48:54 +0000
Subject: [PATCH] Fixed up the tests, so  that make check now works

---
 src/count.c                 |   2 -
 tests/count.stat            |   2 +-
 tests/expect/crosstabs.stat |  11 ++-
 tests/expect/data-fmts.stat |  39 ++++----
 tests/expect/data-list.stat |   4 +-
 tests/expect/expr.stat      | 192 ++++++++++++++++++------------------
 tests/expect/mdfy-vars.stat |   2 +-
 tests/expect/print.stat     |  24 ++---
 tests/expect/t-test.stat    |   6 +-
 tests/expect/vector.stat    |   4 +-
 tests/syntax                |   8 +-
 11 files changed, 148 insertions(+), 146 deletions(-)

diff --git a/src/count.c b/src/count.c
index bbb41e55..7c0420de 100644
--- a/src/count.c
+++ b/src/count.c
@@ -56,8 +56,6 @@
    Perhaps simultaneity could be implemented as an option.  On the
    other hand, what good are the above commands?  */
 
-#undef DEBUGGING
-/*#define DEBUGGING 1*/
 #include "debug-print.h"
 
 /* Definitions. */
diff --git a/tests/count.stat b/tests/count.stat
index f118947b..a6b72d57 100644
--- a/tests/count.stat
+++ b/tests/count.stat
@@ -10,6 +10,6 @@ begin data.
 03 4
 0193
 end data.
-*count c=v1 to v4(1).
+/*count c=v1 to v4(1).
 count c=v1 to v2('2',' 4','1').
 list.
diff --git a/tests/expect/crosstabs.stat b/tests/expect/crosstabs.stat
index db64d4a1..e6d12f98 100644
--- a/tests/expect/crosstabs.stat
+++ b/tests/expect/crosstabs.stat
@@ -1,7 +1,8 @@
-crosstabs.stat:1: CLEAR TRANSFORMATIONS is not allowed (1) before a command to
-        specify the input program, such as DATA LIST, (2) between FILE TYPE and
-        END FILE TYPE, (3) between INPUT PROGRAM and END INPUT PROGRAM.
+crosstabs.stat:1: error: CLEAR TRANSFORMATIONS is not allowed (1) before a
+        command to specify the input program, such as DATA LIST, (2) between
+        FILE TYPE and END FILE TYPE, (3) between INPUT PROGRAM and END INPUT
+        PROGRAM.
 crosstabs.stat:1: warning: This command not executed.
-crosstabs.stat:17: CROSSTABS: Syntax error expecting end of command at
+crosstabs.stat:18: error: CROSSTABS: Syntax error expecting end of command at
         `PIVOT'.
-crosstabs.stat:17: warning: This command not executed.
+crosstabs.stat:18: warning: This command not executed.
diff --git a/tests/expect/data-fmts.stat b/tests/expect/data-fmts.stat
index 531d1fe1..f7757ed2 100644
--- a/tests/expect/data-fmts.stat
+++ b/tests/expect/data-fmts.stat
@@ -1,21 +1,18 @@
-data-fmts.stat:24: data-file error: (columns 33-40, field type F8.0) Field
-        does not form a valid floating-point constant: "  abcd  ".
-data-fmts.stat:24: data-file error: (columns 41-48, field type PIBHEX8.0)
-        Trailing characters in field: "  ghjk  ".
-data-fmts.stat:24: data-file error: (columns 49-56, field type N8.0) All
-        characters in field must be digits.  Field actually contained:
-        "-1234567".
-data-fmts.stat:25: data-file error: (columns 17-24, field type COMMA8.0)
-        Trailing characters in field: "1234+56 ".
-data-fmts.stat:25: data-file error: (columns 25-32, field type DOLLAR8.0)
-        Trailing characters in field: "$1234+56".
-data-fmts.stat:25: data-file error: (columns 33-40, field type F8.0) Trailing
-        characters in field: "   0 1  ".
-data-fmts.stat:25: data-file error: (columns 49-56, field type N8.0) All
-        characters in field must be digits.  Field actually contained:
-        "12345e67".
-data-fmts.stat:26: data-file error: (columns 33-40, field type F8.0) Trailing
-        characters in field: " 1.2 3  ".
-data-fmts.stat:26: data-file error: (columns 49-56, field type N8.0) All
-        characters in field must be digits.  Field actually contained:
-        "1234e67 ".
+data-fmts.stat:25: error: (columns 33-40, field type F8.0) Field does not form
+        a valid floating-point constant.
+data-fmts.stat:25: error: (columns 41-48, field type PIBHEX8.0) Unrecognized
+        character in field.
+data-fmts.stat:25: error: (columns 49-56, field type N8.0) All characters in
+        field must be digits.
+data-fmts.stat:26: error: (columns 17-24, field type COMMA8.0) Field contents
+        followed by garbage.
+data-fmts.stat:26: error: (columns 25-32, field type DOLLAR8.0) Field contents
+        followed by garbage.
+data-fmts.stat:26: error: (columns 33-40, field type F8.0) Field contents
+        followed by garbage.
+data-fmts.stat:26: error: (columns 49-56, field type N8.0) All characters in
+        field must be digits.
+data-fmts.stat:27: error: (columns 33-40, field type F8.0) Field contents
+        followed by garbage.
+data-fmts.stat:27: error: (columns 49-56, field type N8.0) All characters in
+        field must be digits.
diff --git a/tests/expect/data-list.stat b/tests/expect/data-list.stat
index 4e4a0799..651bbc3d 100644
--- a/tests/expect/data-list.stat
+++ b/tests/expect/data-list.stat
@@ -4,8 +4,8 @@ data-list.data:2: warning: LIST: Missing value(s) for all variables from C
 data-list.data:3: warning: LIST: Missing value(s) for all variables from B
         onward.  These will be filled with the system-missing value or blanks,
         as appropriate.
-data-list.data:4: data-file error: (columns 3-10, field type F8.0) Field does
-        not form a valid floating-point constant: "TOOLONGL".
+data-list.data:4: error: (columns 3-12, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:4: warning: LIST: Missing value(s) for all variables from C
         onward.  These will be filled with the system-missing value or blanks,
         as appropriate.
diff --git a/tests/expect/expr.stat b/tests/expect/expr.stat
index 1a3b1ca8..b47539af 100644
--- a/tests/expect/expr.stat
+++ b/tests/expect/expr.stat
@@ -1,144 +1,144 @@
-expr.stat:10: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:10: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:10: warning: This command not executed.
-expr.stat:11: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:11: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:11: warning: This command not executed.
-expr.stat:12: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:12: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:12: warning: This command not executed.
-expr.stat:15: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:15: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:15: warning: This command not executed.
-expr.stat:16: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:16: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:16: warning: This command not executed.
-expr.stat:17: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:17: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:17: warning: This command not executed.
-expr.stat:18: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:18: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:18: warning: This command not executed.
-expr.stat:20: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:20: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:20: warning: This command not executed.
-expr.stat:21: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:21: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:21: warning: This command not executed.
-expr.stat:22: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:22: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:22: warning: This command not executed.
-expr.stat:23: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:23: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:23: warning: This command not executed.
-expr.stat:25: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:25: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:25: warning: This command not executed.
-expr.stat:26: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:26: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:26: warning: This command not executed.
-expr.stat:28: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:28: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:28: warning: This command not executed.
-expr.stat:29: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:29: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:29: warning: This command not executed.
-expr.stat:30: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:30: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:30: warning: This command not executed.
-expr.stat:32: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:32: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:32: warning: This command not executed.
-expr.stat:33: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:33: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:33: warning: This command not executed.
-expr.stat:34: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:34: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:34: warning: This command not executed.
-expr.stat:35: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:35: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:35: warning: This command not executed.
-expr.stat:36: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:36: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:36: warning: This command not executed.
-expr.stat:37: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:37: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:37: warning: This command not executed.
-expr.stat:38: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:38: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:38: warning: This command not executed.
-expr.stat:39: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:39: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:39: warning: This command not executed.
-expr.stat:40: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:40: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:40: warning: This command not executed.
-expr.stat:41: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:41: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:41: warning: This command not executed.
-expr.stat:42: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:42: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:42: warning: This command not executed.
-expr.stat:43: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:43: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:43: warning: This command not executed.
-expr.stat:44: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:44: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:44: warning: This command not executed.
-expr.stat:45: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:45: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:45: warning: This command not executed.
-expr.stat:46: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:46: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:46: warning: This command not executed.
-expr.stat:47: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:47: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:47: warning: This command not executed.
-expr.stat:48: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:48: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:48: warning: This command not executed.
-expr.stat:49: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:49: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:49: warning: This command not executed.
-expr.stat:50: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:50: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:50: warning: This command not executed.
-expr.stat:51: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:51: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:51: warning: This command not executed.
-expr.stat:52: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:52: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:52: warning: This command not executed.
-expr.stat:53: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:53: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:53: warning: This command not executed.
-expr.stat:54: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:54: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:54: warning: This command not executed.
-expr.stat:55: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:55: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:55: warning: This command not executed.
-expr.stat:56: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:56: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:56: warning: This command not executed.
-expr.stat:57: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:57: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:57: warning: This command not executed.
-expr.stat:58: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:58: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:58: warning: This command not executed.
-expr.stat:59: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:59: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:59: warning: This command not executed.
-expr.stat:60: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:60: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:60: warning: This command not executed.
-expr.stat:61: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:61: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:61: warning: This command not executed.
-expr.stat:63: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:63: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:63: warning: This command not executed.
-expr.stat:64: The identifier(s) specified do not form a valid command name:
-        EVAL.
+expr.stat:64: error: The identifier(s) specified do not form a valid command
+        name: EVAL.
 expr.stat:64: warning: This command not executed.
diff --git a/tests/expect/mdfy-vars.stat b/tests/expect/mdfy-vars.stat
index c9a9472f..fb338259 100644
--- a/tests/expect/mdfy-vars.stat
+++ b/tests/expect/mdfy-vars.stat
@@ -1,3 +1,3 @@
-mdfy-vars.stat:22: RENAME VARIABLES: Duplicate variable name `T2' after
+mdfy-vars.stat:22: error: RENAME VARIABLES: Duplicate variable name `T2' after
         renaming.
 mdfy-vars.stat:22: warning: This command not executed.
diff --git a/tests/expect/print.stat b/tests/expect/print.stat
index 09ac7ff3..80d6deff 100644
--- a/tests/expect/print.stat
+++ b/tests/expect/print.stat
@@ -1,30 +1,30 @@
-data-list.data:1: data-file error: (columns 1-8, field type F8.0) Field does
-        not form a valid floating-point constant: "SHORT   ".
+data-list.data:1: error: (columns 1-5, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:1: warning: LIST: The expression on PRINT SPACE evaluated to -
         2147483648.  It's not possible to PRINT SPACE a negative number of
         lines.
-data-list.data:2: data-file error: (columns 1-8, field type F8.0) Field does
-        not form a valid floating-point constant: "RIGHTLEN".
+data-list.data:2: error: (columns 1-8, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:4: warning: LIST: The expression on PRINT SPACE evaluated to -
         2147483648.  It's not possible to PRINT SPACE a negative number of
         lines.
-data-list.data:4: data-file error: (columns 3-10, field type F8.0) Field does
-        not form a valid floating-point constant: "TOOLONGL".
+data-list.data:4: error: (columns 3-12, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:6: warning: LIST: The expression on PRINT SPACE evaluated to -
         2147483648.  It's not possible to PRINT SPACE a negative number of
         lines.
-data-list.data:1: data-file error: (columns 1-8, field type F8.0) Field does
-        not form a valid floating-point constant: "SHORT   ".
-data-list.data:2: data-file error: (columns 1-8, field type F8.0) Field does
-        not form a valid floating-point constant: "RIGHTLEN".
+data-list.data:1: error: (columns 1-5, field type F8.0) Field does not form a
+        valid floating-point constant.
+data-list.data:2: error: (columns 1-8, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:2: warning: LIST: Missing value(s) for all variables from C
         onward.  These will be filled with the system-missing value or blanks,
         as appropriate.
 data-list.data:3: warning: LIST: Missing value(s) for all variables from B
         onward.  These will be filled with the system-missing value or blanks,
         as appropriate.
-data-list.data:4: data-file error: (columns 3-10, field type F8.0) Field does
-        not form a valid floating-point constant: "TOOLONGL".
+data-list.data:4: error: (columns 3-12, field type F8.0) Field does not form a
+        valid floating-point constant.
 data-list.data:4: warning: LIST: Missing value(s) for all variables from C
         onward.  These will be filled with the system-missing value or blanks,
         as appropriate.
diff --git a/tests/expect/t-test.stat b/tests/expect/t-test.stat
index f423900b..b419c8c6 100644
--- a/tests/expect/t-test.stat
+++ b/tests/expect/t-test.stat
@@ -1,7 +1,7 @@
 T-TEST
-  PAIRS=V1 V2 WITH V3 V4 (PAIRED)
-  MISSING=ANALYSIS EXCLUDE
-  FORMAT=LABELS
+  MISSING=LISTWISE EXCLUDE
+  FORMAT=NOLABELS
+  CRITERIA=0.000000
 Missing value
 Missing value
 Missing value
diff --git a/tests/expect/vector.stat b/tests/expect/vector.stat
index 01682e27..124584a0 100644
--- a/tests/expect/vector.stat
+++ b/tests/expect/vector.stat
@@ -1,2 +1,2 @@
-vector.stat:24: LIST: 6 is not a valid index value for vector X.  The result
-        will be set to the empty string.
+vector.stat:24: error: LIST: 6 is not a valid index value for vector X.  The
+        result will be set to the empty string.
diff --git a/tests/syntax b/tests/syntax
index 023b6c31..081919a0 100755
--- a/tests/syntax
+++ b/tests/syntax
@@ -1,8 +1,14 @@
-#! /bin/sh
+#!/bin/sh
+
+
+# This script tests that incorrect syntax on various commands produces the 
+# appropriate error messages
+
 set -e
 RESULT=pass
 
 srcdir=${srcdir:-.}
+
 for x in `cd $srcdir; echo *.stat *.data`; do 
     if [ ! -e $x ]; then
 	ln -s $srcdir/$x .
-- 
2.30.2