automake-patches
[Top][All Lists]
Advanced

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

[FYI] {test-protocols} coverage: a TAP result numbered "0" is always out


From: Stefano Lattarini
Subject: [FYI] {test-protocols} coverage: a TAP result numbered "0" is always out-of-order
Date: Sat, 20 Aug 2011 17:39:11 +0200

* tests/tap-test-number-0.test: New, checks that a test result
numbered as 0 is to be considered out-of-order; this is
consistent with the behaviour of the `prove' utility.
* tests/Makefile.am (tap_with_common_setup_tests): Update.
---
 ChangeLog                    |    8 +++++
 tests/Makefile.am            |    1 +
 tests/Makefile.in            |    1 +
 tests/tap-test-number-0.test |   63 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 0 deletions(-)
 create mode 100755 tests/tap-test-number-0.test

diff --git a/ChangeLog b/ChangeLog
index c64cf6e..376ec9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-08-20  Stefano Lattarini  <address@hidden>
 
+       coverage: a TAP result numbered "0" is always out-of-order
+       * tests/tap-test-number-0.test: New, checks that a test result
+       numbered as 0 is to be considered out-of-order; this is
+       consistent with the behaviour of the `prove' utility.
+       * tests/Makefile.am (tap_with_common_setup_tests): Update.
+
+2011-08-20  Stefano Lattarini  <address@hidden>
+
        cosmetics: fix botched indentation in perl TAP driver
        * lib/tap-driver.pl (main, Getopt::Long::GetOptions): Fix
        improper or botched indentation.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e7f8570..bb79b32 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1198,6 +1198,7 @@ tap-planskip-badexit.test \
 tap-planskip-bailout.test \
 tap-planskip-later-errors.test \
 tap-realtime.test \
+tap-test-number-0.test \
 tap-recheck-logs.test \
 tap-todo-skip-together.test \
 tap-todo-skip-whitespace.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c6ca939..f292472 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1439,6 +1439,7 @@ tap-planskip-badexit.test \
 tap-planskip-bailout.test \
 tap-planskip-later-errors.test \
 tap-realtime.test \
+tap-test-number-0.test \
 tap-recheck-logs.test \
 tap-todo-skip-together.test \
 tap-todo-skip-whitespace.test \
diff --git a/tests/tap-test-number-0.test b/tests/tap-test-number-0.test
new file mode 100755
index 0000000..abce60e
--- /dev/null
+++ b/tests/tap-test-number-0.test
@@ -0,0 +1,63 @@
+#! /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:
+#  - a test result numbered as 0 is to be considered out-of-order
+# This is consistent with the behaviour of the `prove' utility.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+
+cat > a.test <<END
+1..1
+ok 0
+END
+
+cat > b.test <<END
+1..1
+not ok 0
+END
+
+cat > c.test <<END
+1..1
+ok 0 foo # SKIP
+END
+
+cat > d.test <<END
+1..1
+not ok 0 bar # TODO
+END
+
+cat > e.test <<END
+1..1
+ok 0 # TODO
+END
+
+TESTS='a.test b.test c.test d.test e.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=0 error=5
+
+grep '^ERROR: a\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
+grep '^ERROR: b\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
+grep '^ERROR: c\.test 0 foo # OUT-OF-ORDER (expecting 1)$' stdout
+grep '^ERROR: d\.test 0 bar # OUT-OF-ORDER (expecting 1)$' stdout
+grep '^ERROR: e\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
+
+:
-- 
1.7.2.3




reply via email to

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