[Pkg-javascript-commits] [node-evp-bytestokey] 05/07: Add testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Sat May 27 14:09:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-evp-bytestokey.
commit 011d0246de31b81b499bcc31a8f26631401ecc48
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Thu May 11 15:22:44 2017 +0200
Add testsuite
---
debian/control | 1 +
debian/tests/control | 3 +++
debian/tests/runtestsuite | 14 ++++++++++++++
3 files changed, 18 insertions(+)
diff --git a/debian/control b/debian/control
index daac3ff..1ff8e21 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Build-Depends:
, nodejs (>= 4.7)
, dpkg-dev (>= 1.17.14)
, node-create-hash (>= 1.1.1) <!nocheck>
+ , node-tape (>= 4.6) <!nocheck>
Standards-Version: 3.9.8
Homepage: https://github.com/crypto-browserify/EVP_BytesToKey
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-evp-bytestokey.git
diff --git a/debian/tests/control b/debian/tests/control
index f00b1e2..3b717ef 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
Tests: require
Depends: node-evp-bytestokey
+
+Tests: runtestsuite
+Depends: node-evp-bytetokey, node-tape (>= 4.6)
\ No newline at end of file
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..7b11476
--- /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='evp_bytestokey'
+SEDCMD="s,require\s*[(]\s*'[.]/,require('$PACKAGE,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp test.js $tmpdir/test.js
+echo 'test.js' | \
+ xargs -n1 \
+ sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+nodejs $tmpdir/test.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-evp-bytestokey.git
More information about the Pkg-javascript-commits
mailing list