automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {test-protocols} coverage: more TAP driver consistency w.r.t. 'pro


From: Stefano Lattarini
Subject: [FYI] {test-protocols} coverage: more TAP driver consistency w.r.t. 'prove'
Date: Fri, 12 Aug 2011 11:42:36 +0200

* tests/skip-results-with-planskip.test: New test, verifies that
test results seen in a TAP stream that has a "plan with SKIP" are
flagged as errors.
* tests/Makefile.am (tap_with_common_setup_tests): Update.
---
 ChangeLog                            |    8 ++++++
 tests/Makefile.am                    |    1 +
 tests/Makefile.in                    |    1 +
 tests/tap-results-with-planskip.test |   47 ++++++++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+), 0 deletions(-)
 create mode 100755 tests/tap-results-with-planskip.test

diff --git a/ChangeLog b/ChangeLog
index d346d05..19ac010 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-08-12  Stefano Lattarini  <address@hidden>
 
+       coverage: more TAP driver consistency w.r.t. 'prove'
+       * tests/skip-results-with-planskip.test: New test, verifies that
+       test results seen in a TAP stream that has a "plan with SKIP" are
+       flagged as errors.
+       * tests/Makefile.am (tap_with_common_setup_tests): Update.
+
+2011-08-12  Stefano Lattarini  <address@hidden>
+
        tap: improve some comments in the TAP driver
        * lib/tap-driver (handle_tap_plan): Improve comments describing
        possible errors in a "plan with SKIP" directive.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cf78cb6..d1b294e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1183,6 +1183,7 @@ tap-skip-whole-badexit.test \
 tap-skip-whole-bailout.test \
 tap-skip-whole-continue.test \
 tap-skip-whole-unplanned.test \
+tap-results-with-planskip.test \
 tap-todo-skip-together.test \
 tap-todo-skip-whitespace.test \
 tap-todo-skip.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 39d1da0..9c39e9b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1423,6 +1423,7 @@ tap-skip-whole-badexit.test \
 tap-skip-whole-bailout.test \
 tap-skip-whole-continue.test \
 tap-skip-whole-unplanned.test \
+tap-results-with-planskip.test \
 tap-todo-skip-together.test \
 tap-todo-skip-whitespace.test \
 tap-todo-skip.test \
diff --git a/tests/tap-results-with-planskip.test 
b/tests/tap-results-with-planskip.test
new file mode 100755
index 0000000..fa4f06e
--- /dev/null
+++ b/tests/tap-results-with-planskip.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# TAP support:
+#  - test results seen in a TAP stream that has a "plan with SKIP" are
+#    flagged as errors.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+
+cat > foo.test <<END
+1..0 # SKIP
+ok 1 # SKIP
+END
+
+cat > bar.test <<END
+ok 1 # SKIP
+1..0 # SKIP
+END
+
+TESTS='foo.test bar.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
+cat stdout
+
+count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
+
+grep '^SKIP: foo\.test$' 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
+grep '^ERROR: bar\.test - too many tests run (expected 0, got 1)$' stdout
+
+:
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]