[Pkg-javascript-commits] [node-read-only-stream] 21/22: Runtestsuite

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 20 13:52:19 UTC 2017


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

rouca pushed a commit to branch master
in repository node-read-only-stream.

commit 8ce78415296d919352d8c5a4a7e224fb4348508f
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Fri Aug 11 23:09:18 2017 +0200

    Runtestsuite
---
 debian/tests/control      |  9 +++++++++
 debian/tests/runtestsuite | 16 ++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
index b4d3164..b588773 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,11 @@
 Tests: require
 Depends: node-read-only-stream
+
+Tests: runtestsuite
+Depends: node-read-only-stream
+ , node-through2 (>= 2.0.0)
+ , node-through (>= 2.3.4)
+ , node-concat-stream (>= 1.6.0)
+ , node-tape (>=4.2.0) <!nocheck>
+
+
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..b0c60b7
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='read-only-stream'
+SEDCMD="s,require\s*[(]\s*[\"'][.][.][^']*[\"']\s*[)],require('$PACKAGE'),g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir
+find test -maxdepth 1 -name '*.js' -print0 | \
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedcmd "$SEDCMD" "$tmpdir"
+
+# this test write to stderr redirect to stdout
+tape "$tmpdir/test/*.js"
\ No newline at end of file

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



More information about the Pkg-javascript-commits mailing list