projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f25ba1c
)
Update tapview.
author
Eric S. Raymond
<esr@thyrsus.com>
Sun, 13 Aug 2023 16:55:14 +0000
(12:55 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 13 Aug 2023 16:55:14 +0000
(12:55 -0400)
test/tapview
patch
|
blob
|
history
diff --git
a/test/tapview
b/test/tapview
index ca984eb9e91eea2f77ee841cf32f49d51aa78f1d..70df8b1c56e04d7183b5bc90d853d327653f349e 100755
(executable)
--- a/
test/tapview
+++ b/
test/tapview
@@
-1,18
+1,18
@@
#! /bin/sh
# tapview - a TAP (Test Anything Protocol) viewer in pure POSIX shell
#
#! /bin/sh
# tapview - a TAP (Test Anything Protocol) viewer in pure POSIX shell
#
-# Copyright by Eric S. Raymond
+# SPDX-FileCopyrightText: Eric S. Raymond <esr@thyrsus.com>
+# SPDX-License-Identifier: MIT-0
#
# This code is intended to be embedded in your project. The author
# grants permission for it to be distributed under the prevailing
# license of your project if you choose, provided that license is
#
# This code is intended to be embedded in your project. The author
# grants permission for it to be distributed under the prevailing
# license of your project if you choose, provided that license is
-# OSD-compliant; otherwise the following SPDX tag incorporates
a
-# license by reference.
+# OSD-compliant; otherwise the following SPDX tag incorporates
the
+#
MIT No Attribution
license by reference.
#
#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# This is version 1.6
# A newer version may be available at https://gitlab.com/esr/tapview
# A newer version may be available at https://gitlab.com/esr/tapview
+# Check your last commit dqte for this file against the commit list
+# there to see if it might be a good idea to update.
#
OK="."
FAIL="F"
#
OK="."
FAIL="F"
@@
-20,13
+20,16
@@
SKIP="s"
TODO_NOT_OK="x"
TODO_OK="u"
TODO_NOT_OK="x"
TODO_OK="u"
+LF='
+'
+
ship_char() {
# shellcheck disable=SC2039
printf '%s' "$1" # https://www.etalabs.net/sh_tricks.html
}
ship_line() {
ship_char() {
# shellcheck disable=SC2039
printf '%s' "$1" # https://www.etalabs.net/sh_tricks.html
}
ship_line() {
- report="${report}${1}
\n
"
+ report="${report}${1}
$LF
"
}
ship_error() {
}
ship_error() {
@@
-35,7
+38,7
@@
ship_error() {
then
echo ""
fi
then
echo ""
fi
- report="${report}${1}
\n
"
+ report="${report}${1}
$LF
"
echo "${report}"
exit 1
}
echo "${report}"
exit 1
}
@@
-77,6
+80,10
@@
context_pop () {
then
ship_line "Expected $(context_get expect) tests but only ${testcount} ran."
status=1
then
ship_line "Expected $(context_get expect) tests but only ${testcount} ran."
status=1
+ elif [ "$(context_get plan)" != "" ] && [ "$(context_get expect)" -lt "$(context_get count)" ]
+ then
+ ship_line "${testcount} ran but $(context_get expect) expected."
+ status=1
fi
}
fi
}