+2009-04-06 Eric Blake <ebb9@byu.net>
+
+ Hard fail any test with syntax errors.
+ * lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
+ Guarantee test failure on syntax error, rather than inheriting
+ status from previous test.
+ * tests/autotest.at (Syntax error): New test.
+
2009-03-31 Eric Blake <ebb9@byu.net>
Beta Release Version 2.63b.
report this failure to <AT_PACKAGE_BUGREPORT>.
_ATEOF
AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
+ at_xfail=no at_status=99
fi
$at_verbose AS_ECHO_N(["$at_group. $at_setup_line: "])
AS_ECHO_N(["$at_group. $at_setup_line: "]) >> "$at_group_log"
# _AT_DECIDE_TRACEABLE(COMMANDS)
# ------------------------------
-# Worker for for _AT_CHECK that expands to shell code. If COMMANDS are safe to
+# Worker for _AT_CHECK that expands to shell code. If COMMANDS are safe to
# trace with `set -x', the shell code will evaluate to true. Otherwise,
# the shell code will print a message stating an aspect of COMMANDS that makes
# tracing them unsafe, and evaluate to false.
# filter out the unadorned trace lines, we disable shell tracing entirely for
# commands that could span multiple lines.
#
-# Limiting COMMANDS to a single command is not good either, since them
+# Limiting COMMANDS to a single command is not good either, since then
# the user herself would use {} or (), and then we face the same problem.
#
# But then, there is no point in running
]], [], [], [], [], [],
[AT_CHECK([sed -n '/exec AS_MESSAGE_LOG_FD/q; />&AS_MESSAGE_LOG_FD/p' < micro-suite])])
-## ----------------------------------------------------- ##
-## Newlines and command substitutions in test commands. ##
-## ----------------------------------------------------- ##
+## ----------------- ##
+## Status handling. ##
+## ----------------- ##
AT_CHECK_AT_TEST([Truth],
[AT_CHECK([:], 0, [], [])])
[], [], [], [], [],
[AT_CHECK([grep skipped micro-suite.log], [], [ignore])])
+AT_CHECK_AT_TEST([Syntax error],
+ [AT_CHECK([:])
+ AT_CLEANUP
+ AT_SETUP([syntax])
+ AT_CHECK([if])
+ AT_CLEANUP
+ AT_SETUP([another test])
+ AT_CHECK([:])],
+ [], [1], [], [stderr], [],
+ [AT_CHECK([grep "unable to parse test group: 2" stderr], [0], [ignore])
+ AT_CHECK([$CONFIG_SHELL ./micro-suite 1 3], [0], [ignore])])
+
AT_CHECK_AT_TEST([errexit],
[AT_CHECK([false])
AT_CLEANUP
AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])],
[--errexit])
+## ----------------------------------------------------- ##
+## Newlines and command substitutions in test commands. ##
+## ----------------------------------------------------- ##
+
AT_CHECK_AT_TEST([Literal multiline command],
[AT_CHECK([echo Auto'
'conf], 0, [Auto