+2011-08-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tap/awk: correctly extract message from SKIP plans
+ * lib/tap-driver.sh (/^1\.\.0+[ \t]*#/): Add a forgotten `?' to
+ the regex used to extract the skip message from a "1..0" TAP plan.
+ * tests/planskip.test: Check for the just-fixed bug.
+ * tests/tap-planskip-unplanned-corner.test: Don't be too strict
+ w.r.t. the formatting of the "skip whole test" message, to avoid
+ failing due to bugs irrelevant for this test (like the one just
+ fixed).
+
2011-08-21 Stefano Lattarini <stefano.lattarini@gmail.com>
tap/awk: support colorized output
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
-scriptversion=2011-08-21.16; # UTC
+scriptversion=2011-08-21.21; # UTC
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
# leading and trailing whitespace. This is a little more tricky in
# thruth, since we want to also strip a potential leading "SKIP"
# string from the message.
- sub("^[^#]*#[ \\t]*(SKIP[: \\t][ \\t]*)", "")
+ sub("^[^#]*#[ \\t]*(SKIP[: \\t][ \\t]*)?", "")
sub("[ \\t]*$", "");
handle_tap_plan(0, $0)
next
count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
-grep '^SKIP: foo\.test$' stdout
+# Don't be too strict w.r.t. the format of the "skip whole test" message.
+grep '^SKIP: foo\.test$' stdout || grep '^SKIP: foo\.test [^0-9]' stdout
grep '^ERROR: foo\.test 1 # UNPLANNED$' stdout
grep '^ERROR: foo\.test - too many tests run (expected 0, got 1)$' stdout
grep '^SKIP: bar\.test 1 # SKIP$' stdout
count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=6 error=0
+# Look for a regression where the "1..0" wasn't being stripped from the
+# SKIP message.
+$FGREP '1..0' stdout && Exit 1
+
grep '^SKIP: foo\.test$' stdout
grep '^SKIP: bar\.test$' stdout
grep '^SKIP: baz\.test' stdout # Deliberately laxer, see above for why.