msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2004-03-20 00:30+0800\n"
+"POT-Creation-Date: 2004-03-21 10:15+0800\n"
"PO-Revision-Date: 2004-01-23 13:04+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "expecting %s"
msgstr ""
-#: src/lexer.c:524 src/val-labs.c:148
+#: src/lexer.c:524 src/val-labs.c:155
msgid "expecting string"
msgstr ""
-#: src/lexer.c:538 src/val-labs.c:157
+#: src/lexer.c:538 src/val-labs.c:164
msgid "expecting integer"
msgstr ""
msgid "%s without %s."
msgstr ""
+#: src/main.c:71
+msgid "Error initializing output drivers."
+msgstr ""
+
+#: src/main.c:132
+msgid "This command not executed."
+msgstr ""
+
+#: src/main.c:136
+msgid ""
+"Skipping the rest of this command. Part of this command may have been "
+"executed."
+msgstr ""
+
+#: src/main.c:141
+msgid ""
+"Skipping the rest of this command. This command was fully executed up to "
+"this point."
+msgstr ""
+
+#: src/main.c:146
+msgid ""
+"Trailing garbage was encountered following this command. The command was "
+"fully executed to this point."
+msgstr ""
+
#: src/matrix-data.c:191
msgid "VARIABLES subcommand multiply specified."
msgstr ""
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
-#: src/val-labs.c:112
+#: src/val-labs.c:119
#, c-format
msgid ""
"It is not possible to assign value labels to long string variables such as %"
"s."
msgstr ""
-#: src/val-labs.c:161
+#: src/val-labs.c:168
#, c-format
msgid "Value label `%g' is not integer."
msgstr ""
-#: src/val-labs.c:171
+#: src/val-labs.c:178
msgid "Truncating value label to 60 characters."
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2004-03-20 00:30+0800\n"
+"POT-Creation-Date: 2004-03-21 10:15+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "expecting %s"
msgstr ""
-#: src/lexer.c:524 src/val-labs.c:148
+#: src/lexer.c:524 src/val-labs.c:155
msgid "expecting string"
msgstr ""
-#: src/lexer.c:538 src/val-labs.c:157
+#: src/lexer.c:538 src/val-labs.c:164
msgid "expecting integer"
msgstr ""
msgid "%s without %s."
msgstr ""
+#: src/main.c:71
+msgid "Error initializing output drivers."
+msgstr ""
+
+#: src/main.c:132
+msgid "This command not executed."
+msgstr ""
+
+#: src/main.c:136
+msgid ""
+"Skipping the rest of this command. Part of this command may have been "
+"executed."
+msgstr ""
+
+#: src/main.c:141
+msgid ""
+"Skipping the rest of this command. This command was fully executed up to "
+"this point."
+msgstr ""
+
+#: src/main.c:146
+msgid ""
+"Trailing garbage was encountered following this command. The command was "
+"fully executed to this point."
+msgstr ""
+
#: src/matrix-data.c:191
msgid "VARIABLES subcommand multiply specified."
msgstr ""
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
-#: src/val-labs.c:112
+#: src/val-labs.c:119
#, c-format
msgid ""
"It is not possible to assign value labels to long string variables such as %"
"s."
msgstr ""
-#: src/val-labs.c:161
+#: src/val-labs.c:168
#, c-format
msgid "Value label `%g' is not integer."
msgstr ""
-#: src/val-labs.c:171
+#: src/val-labs.c:178
msgid "Truncating value label to 60 characters."
msgstr ""
+Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
+ used with incorrect syntax.
+
+ * error.c, error.h et al: Overridden definition of assert for a
+ custom one.
+
+ * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
+ subcommand was given when it ought to have been.
+
Sat Mar 20 22:19:08 2004 Ben Pfaff <blp@gnu.org>
* tab.c: (tab_vline) Fix assertions to respect row_ofs and
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#if __OPTIMIZE__
#define NDEBUG
#endif
-#include <assert.h>
+#include "error.h"
\f
/* Finds an element in ARRAY, which contains COUNT elements of
SIZE bytes each, using COMPARE for comparisons. Returns the
#include <config.h>
#include "alloc.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#include "str.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <errno.h>
#include <limits.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <config.h>
#include "cmdline.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <stdio.h>
#include <errno.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include "command.h"
#include <stdio.h>
#include <stdlib.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
*/
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <config.h>
#include "data-in.h"
-#include <assert.h>
+#include "error.h"
#include <math.h>
#include <ctype.h>
#include <stdarg.h>
#include <config.h>
#include "data-list.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <float.h>
#include <stdio.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <math.h>
#include <float.h>
/* FIXME: Many possible optimizations. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <config.h>
#include "devind.h"
-#include <assert.h>
+#include "error.h"
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include "dfm.h"
#include <ctype.h>
#include <errno.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "algorithm.h"
#include "alloc.h"
#include <config.h>
#include "do-ifP.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
#include "error.h"
#include <ctype.h>
#include <stdarg.h>
#include "settings.h"
#include "str.h"
#include "var.h"
+#include "version.h"
int err_error_count;
int err_warning_count;
local_free (buf);
}
+
+
+void
+request_bug_report_and_abort(const char *msg )
+{
+ fprintf(stderr,
+ "******************************************************************\n"
+ "You have discovered a bug in PSPP.\n\n"
+ " Please report this, by sending "
+ "an email to " PACKAGE_BUGREPORT ",\n"
+ "explaining what you were doing when this happened, and including\n"
+ "a sample of your input file which caused it.\n");
+
+ fprintf(stderr,
+ "Also, please copy the following lines into your bug report:\n\n"
+ "bare_version: %s\n"
+ "version: %s\n"
+ "stat_version: %s\n"
+ "host_system: %s\n"
+ "build_system: %s\n"
+ "default_config_path: %s\n"
+ "include_path: %s\n"
+ "groff_font_path: %s\n"
+ "locale_dir: %s\n",
+
+ bare_version,
+ version,
+ stat_version,
+ host_system,
+ build_system,
+ default_config_path,
+ include_path,
+ groff_font_path,
+ locale_dir);
+
+ if ( msg )
+ fprintf(stderr,"Diagnosis: %s\n",msg);
+
+ fprintf(stderr,
+ "******************************************************************\n");
+
+ abort();
+}
+
+void
+err_assert_fail(const char *expr, const char *file, int line)
+{
+ const char msg[256];
+ snprintf(msg,256,"Assertion failed: %s:%d; (%s)",file,line,expr);
+ request_bug_report_and_abort( msg );
+}
void err_hcf (int exit_code) NO_RETURN;
void err_vmsg (const struct error *);
+/* Used in panic situations only */
+void request_bug_report_and_abort(const char *msg );
+
+void err_assert_fail(const char *expr, const char *file, int line);
+
+#undef __STRING
+#define __STRING(x) #x
+#undef assert
+
+
+#define assert(expr) ( (void) ( expr ? 0 : \
+ err_assert_fail(__STRING(expr), __FILE__, __LINE__)) )
+
+
#endif /* error.h */
#include <ctype.h>
#include "expr.h"
#include "exprP.h"
-#include <assert.h>
+#include "error.h"
#include <math.h>
#include <errno.h>
#include <stdio.h>
#include <config.h>
#include "expr.h"
#include "exprP.h"
-#include <assert.h>
+#include "error.h"
#include <math.h>
#include <ctype.h>
#include <errno.h>
#include <config.h>
#include "expr.h"
#include "exprP.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <float.h>
#include <stdlib.h>
#include <config.h>
#include "file-handle.h"
-#include <assert.h>
+#include "error.h"
#include <errno.h>
#include <stdlib.h>
#include "alloc.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include "filename.h"
#include <stdlib.h>
#include <ctype.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <config.h>
#include "format.h"
#include <ctype.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "error.h"
#include "lexer.h"
*/
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <math.h>
#include <stdlib.h>
#include "alloc.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <config.h>
#include "getline.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <config.h>
#include "glob.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <stdio.h>
#include <config.h>
#include "font.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <config.h>
#include "hash.h"
-#include <assert.h>
+#include "error.h"
#include <limits.h>
#include <stdlib.h>
#include "algorithm.h"
#if GLOBAL_DEBUGGING
#undef NDEBUG
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
/* Displays contents of hash table H on stdout. */
#include <config.h>
#include "htmlP.h"
-#include <assert.h>
+#include "error.h"
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <float.h>
#include <stdlib.h>
#include "alloc.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include "levene.h"
#include "hash.h"
#include "str.h"
#include <config.h>
#include "lexer.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <errno.h>
#include <limits.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#include "alloc.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include "alloc.h"
#include "command.h"
#include "do-ifP.h"
#include <config.h>
#include "main.h"
-#include <assert.h>
#include <stdio.h>
#include "cmdline.h"
#include "command.h"
#include "glob.h"
#include "lexer.h"
#include "output.h"
-#include "version.h"
#include <signal.h>
#include <stdlib.h>
void
bug_handler(int sig UNUSED)
{
- fprintf(stderr,
- "******************************************************************\n"
- "You have discovered a bug in PSPP.\n\n"
- " Please report this, by sending "
- "an email to " PACKAGE_BUGREPORT ",\n"
- "explaining what you were doing when this happened, and including\n"
- "a sample of your input file which caused it.\n");
-
- fprintf(stderr,
- "Also, please copy the following lines into your bug report:\n\n"
- "bare_version: %s\n"
- "version: %s\n"
- "stat_version: %s\n"
- "host_system: %s\n"
- "build_system: %s\n"
- "default_config_path: %s\n"
- "include_path: %s\n"
- "groff_font_path: %s\n"
- "locale_dir: %s\n"
- "******************************************************************\n",
- bare_version,
- version,
- stat_version,
- host_system,
- build_system,
- default_config_path,
- include_path,
- groff_font_path,
- locale_dir);
-
- exit(-1);
+ request_bug_report_and_abort("Segmentation Violation");
}
-
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <ctype.h>
#include <float.h>
#include <config.h>
#include "matrix.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
\f
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
-#include <assert.h>
+#include "error.h"
#include "alloc.h"
#include "command.h"
#include "hash.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "command.h"
#include "error.h"
#include <config.h>
#include <stdlib.h>
-#include <assert.h>
+#include "error.h"
#include "algorithm.h"
#include "alloc.h"
#include "bitvector.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "command.h"
#include "error.h"
#include <config.h>
#include "output.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <config.h>
#include "pfm.h"
-#include <assert.h>
+#include "error.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <config.h>
#include "pfm.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <config.h>
#endif
#include "pool.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "str.h"
#if !NO_POSTSCRIPT
#include <ctype.h>
-#include <assert.h>
+#include "error.h"
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
/* FIXME: seems like a lot of code duplication with data-list.c. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
{
indent = 0;
- dump (0, "#include <assert.h>");
dump (0, "#include <stdlib.h>");
dump (0, "#include \"alloc.h\"");
dump (0, "#include \"error.h\"");
#include <config.h>
#include "random.h"
-#include <assert.h>
+#include "error.h"
#include <inttypes.h>
#include <limits.h>
#include <math.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <config.h>
#include <stdlib.h>
-#include <assert.h>
+#include "error.h"
#include "alloc.h"
#include "command.h"
#include "error.h"
#include <config.h>
#include "repeat.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <config.h>
#include "settings.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <config.h>
#include "sfm.h"
#include "sfmP.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <config.h>
#include "sfm.h"
#include "sfmP.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <config.h>
#include "som.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#include "output.h"
#include <config.h>
#include "sort.h"
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <config.h>
#include "str.h"
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <ctype.h>
#include <stdlib.h>
#include "algorithm.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
static int n_pairs = 0 ;
struct pair
{
-#if 1
/* The variables comprising the pair */
struct variable *v[2];
-#endif
/* The number of valid variable pairs */
double n;
hsh_destroy(hash);
}
}
+ else if ( !cmd.sbc_variables)
+ {
+ msg(SE, _("One or more VARIABLES must be specified."));
+ return CMD_FAILURE;
+ }
+
/* If /MISSING=INCLUDE is set, then user missing values are ignored */
if (cmd.incl == TTS_INCLUDE )
pairs[i].ssq[0] += weight * sqr(val0->f);
pairs[i].ssq[1] += weight * sqr(val1->f);
-#if 0
- pairs[i].correlation += weight *
- ( val0->f - pairs[i].v[0]->p.t_t.ugs.mean )
- *
- ( val1->f - pairs[i].v[1]->p.t_t.ugs.mean );
-#endif
-
pairs[i].sum_of_prod += weight * val0->f * val1->f ;
-
pairs[i].sum_of_diffs += weight * ( val0->f - val1->f ) ;
pairs[i].ssq_diffs += weight * sqr(val0->f - val1->f);
}
pairs[i].correlation /= pairs[i].std_dev[0] * pairs[i].std_dev[1];
pairs[i].correlation *= pairs[i].n / ( pairs[i].n - 1 );
-#if 0
- pairs[i].correlation /= pairs[i].v[0]->p.t_t.ugs.std_dev *
- pairs[i].v[1]->p.t_t.ugs.std_dev ;
- pairs[i].correlation /= n - 1;
-#endif
-
-
pairs[i].mean_diff = pairs[i].sum_of_diffs / n ;
-
pairs[i].std_dev_diff = sqrt ( n / (n - 1) * (
( pairs[i].ssq_diffs / n )
-
#include <config.h>
#include "tab.h"
#include <ctype.h>
-#include <assert.h>
#include <stdarg.h>
#include <limits.h>
#include <stdlib.h>
+#include "error.h"
#include "alloc.h"
#include "command.h"
#include "format.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stddef.h>
#include <stdlib.h>
#include "alloc.h"
{
struct variable **vars; /* Variable list. */
int var_cnt; /* Number of variables. */
+ int parse_err=0; /* true if error parsing variables */
lex_match ('/');
while (token != '.')
{
- parse_variables (default_dict, &vars, &var_cnt, PV_SAME_TYPE);
+ parse_err = !parse_variables (default_dict, &vars, &var_cnt,
+ PV_SAME_TYPE) ;
+ if (var_cnt < 1)
+ {
+ free(vars);
+ return CMD_FAILURE;
+ }
if (!verify_val_labs (vars, var_cnt))
goto lossage;
if (erase)
return CMD_TRAILING_GARBAGE;
}
- return CMD_SUCCESS;
+ return parse_err ? CMD_PART_SUCCESS_MAYBE : CMD_SUCCESS;
lossage:
free (vars);
#include <config.h>
#include "value-labels.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include <string.h>
#include "alloc.h"
#include <config.h>
#include "var.h"
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <config.h>
#include "var.h"
-#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include "alloc.h"
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <config.h>
#include "vfm.h"
#include "vfmP.h"
-#include <assert.h>
+#include "error.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "error.h"
#include <stdio.h>
#include "command.h"
#include "error.h"
bugs/crosstabs.sh \
bugs/data-crash.sh \
bugs/random.sh \
- bugs/temporary.sh
+ bugs/t-test.sh \
+ bugs/temporary.sh \
+ bugs/val-labs.sh
noinst_PROGRAMS = gengarbage
--- /dev/null
+#!/bin/sh
+
+# This program tests for a bug which caused T-TEST to
+# crash when given invalid syntax
+
+
+TEMPDIR=/tmp/pspp-tst-$$
+
+here=`pwd`;
+
+# ensure that top_srcdir is absolute
+cd $top_srcdir; top_srcdir=`pwd`
+
+export STAT_CONFIG_PATH=$top_srcdir/config
+
+
+cleanup()
+{
+ rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+ echo $activity
+ echo FAILED
+ cleanup;
+ exit 1;
+}
+
+
+no_result()
+{
+ echo $activity
+ echo NO RESULT;
+ cleanup;
+ exit 2;
+}
+
+pass()
+{
+ cleanup;
+ exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+activity="create program"
+cat > $TEMPDIR/rnd.sps <<EOF
+DATA LIST LIST /id * a * .
+BEGIN DATA.
+1 3.5
+2 2.0
+3 2.0
+4 3.5
+5 3.0
+6 4.0
+END DATA.
+
+T-TEST /testval=2.0 .
+T-TEST /groups=id(3) .
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/rnd.sps > /dev/null
+if [ $? -ne 1 ] ; then fail ; fi
+
+pass;
--- /dev/null
+#!/bin/sh
+
+# This program tests for a bug which caused VALUE LABELS to
+# crash when given invalid syntax
+
+
+TEMPDIR=/tmp/pspp-tst-$$
+
+here=`pwd`;
+
+# ensure that top_srcdir is absolute
+cd $top_srcdir; top_srcdir=`pwd`
+
+export STAT_CONFIG_PATH=$top_srcdir/config
+
+
+cleanup()
+{
+ rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+ echo $activity
+ echo FAILED
+ cleanup;
+ exit 1;
+}
+
+
+no_result()
+{
+ echo $activity
+ echo NO RESULT;
+ cleanup;
+ exit 2;
+}
+
+pass()
+{
+ cleanup;
+ exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+activity="create program"
+cat > $TEMPDIR/rnd.sps <<EOF
+DATA LIST LIST /a * pref * .
+BEGIN DATA.
+ 1.00 1.00
+ 1.00 2.00
+ 2.00 1.00
+ 2.00 2.00
+END DATA.
+
+VALUE LABELS /var=a 'label for a'.
+
+
+
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/rnd.sps > /dev/null
+if [ $? -ne 1 ] ; then fail ; fi
+
+pass;