summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/syncdocs.sh2
-rwxr-xr-xutils/tap-test20
2 files changed, 20 insertions, 2 deletions
diff --git a/utils/syncdocs.sh b/utils/syncdocs.sh
index e723edd2..ed76bf85 100755
--- a/utils/syncdocs.sh
+++ b/utils/syncdocs.sh
@@ -11,7 +11,7 @@ howto=$site/documentation/startup/
# remove everything until H1 and optionally 2 DIVs before the
# FOOTER. May need to be adjusted as the source pages change
pageclean_regex='s{.*(?=<h1)}{}s;
-s{\s*(</div>\s*)?(</div>\s*)?<footer.*}{}s;
+s{(\s*<script\s.*?</script>)?\s*(</div>\s*){0,3}<footer.*}{}s;
s{(<.*?)\sclass="(?:highlighter-rouge|highlight)"(.*?>)}{\1\2}g;'
srcdir=`dirname "$0"`
diff --git a/utils/tap-test b/utils/tap-test
index 481e333e..b3ef8b04 100755
--- a/utils/tap-test
+++ b/utils/tap-test
@@ -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