[Pkg-javascript-commits] [node-string-decoder] 03/06: Add testsuite

Bastien Roucariès rouca at moszumanska.debian.org
Mon May 15 15:05:08 UTC 2017


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

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

commit 8f21d01e4f10ab8f68ba992725d91376739120b9
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon May 15 16:13:35 2017 +0200

    Add testsuite
---
 debian/control            |  2 +-
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 14 ++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 77742a3..27e4bb5 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 10),
                nodejs (>= 4.7),
 	       dpkg-dev (>= 1.17.14),
 	       node-buffer-shims (>= 1.0.0) <!nocheck>,
-               node-tap <!nocheck>
+               node-tap (>= 8.0) <!nocheck>
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-string-decoder.git
 Vcs-Git: https://anonscm.debian.org/pkg-javascript/node-string-decoder.git
diff --git a/debian/tests/control b/debian/tests/control
index 472b805..4546406 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-string-decoder
+
+Tests: runtestsuite
+Depends: node-string-decoder, node-tap (>= 8.0)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..2719735
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='string-decoder'
+SEDCMD="s,require\s*[(]\s*'[.][.][/][.][.][/]',require('$PACKAGE',g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/
+find test -name '*.js' -print0 |
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed -e "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+nodejs $tmpdir/test/parallel/*.js

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



More information about the Pkg-javascript-commits mailing list