1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #818 from ailin-nemui/test-tap-backward-compat

add backwards compatible code for running tap tests
This commit is contained in:
ailin-nemui 2018-02-02 14:09:10 +01:00 committed by GitHub
commit 17aafe974b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,4 +2,22 @@
# run a GTest in tap mode. The test binary is passed as $1
$1 -k --tap
t="$1"; shift
if ${PKG_CONFIG:-pkg-config} --atleast-version 2.40 glib-2.0; then
exec "$t" -k --tap "$@"
else # GTest does not support tap yet
(((("$t" "$@"; echo $? >&3) | ${AM_TAP_AWK:-awk} '
{
if (/: /) {
i++
ok = /: OK/
sub(/:/, " #")
print (ok ? "ok " : "not ok ") i " " $0
} else {
print "# " $0
}
} END {
print 1 ".." i
}
' >&4) 3>&1) | (read xs; exit $xs)) 4>&1
fi