[Pkg-javascript-commits] [node-create-hash] 36/40: Run testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Sat May 27 14:10:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-create-hash.
commit 71094c9f5df2d27208d9a55a3a0a9bc8f590a1d8
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Wed May 3 13:28:58 2017 +0200
Run testsuite
---
debian/tests/control | 4 ++++
debian/tests/runtestsuite | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/debian/tests/control b/debian/tests/control
index 5107602..8bafc8b 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,6 @@
Tests: require
Depends: node-create-hash
+
+Tests: runtestsuite
+Depends: node-create-hash, node-hash-test-vectors (>= 1.3.2)
+
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..acfc6e5
--- /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='create-hash'
+SEDCMD="s,require\s*[(]\s*'[.]/,require('$PACKAGE/,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test.js $tmpdir
+echo 'test.js' |
+ xargs -n1 \
+ sh -c 'set -e; echo "TESTING: $3"; sed -e "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+mocha -R spec $tmpdir/test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-create-hash.git
More information about the Pkg-javascript-commits
mailing list