[Pkg-javascript-commits] [node-mkdirp] 04/05: Fix testsuite

Bastien Roucariès rouca at moszumanska.debian.org
Mon Sep 18 09:17:11 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-mkdirp.

commit 253fd13c637fad440fbee70d6cd3f105e2bbb89a
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Fri Sep 15 21:52:42 2017 +0200

    Fix testsuite
---
 debian/tests/runtestsuite | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
index 3833fa5..17eb4b7 100755
--- a/debian/tests/runtestsuite
+++ b/debian/tests/runtestsuite
@@ -3,6 +3,9 @@ set -e
 PACKAGE=mkdirp
 SEDCMD="-e s,require[\(][[\'][.][.]/[\'][\)],require\(\'mkdirp\'\),g"
 
+sed_move_to_stderr() {
+    sed  -e "/$1/w /dev/stderr" -e "/$1/d"
+}
 
 tmpdir=$(mktemp -d)
 trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
@@ -13,4 +16,11 @@ find test -name '*.js' -print0 | \
 	  sh -c 'set -e; echo "TESTING: $3"; sed $1 < $3 > $2/$3' sedtape "$SEDCMD" "$tmpdir"
 
 cd $tmpdir
-tap test/*.js
+
+exec 5>&1
+exec 3>&1
+error_tap=$( ( (tap -R spec --gc test/*.js 2>&1 >&3 3>&- ; echo $? >&4)  | sed_move_to_stderr 'about to write' 2>&1 >&3 3>&- ) 4>&1 >&5)
+exec 3>&-
+exec 5>&-
+test "X$error_tap" = "X0"
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mkdirp.git



More information about the Pkg-javascript-commits mailing list