[Pkg-javascript-commits] [node-syntax-error] 47/47: Add testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:30:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-syntax-error.
commit b57928fda881f4789fc52229ba03bfa4567bb3e0
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Sat Aug 19 00:06:16 2017 +0200
Add testsuite
---
debian/copyright | 2 +-
debian/tests/control | 3 +++
debian/tests/runtestsuite | 15 +++++++++++++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/debian/copyright b/debian/copyright
index 0b31691..f8342ec 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,7 +4,7 @@ Upstream-Contact: https://github.com/substack/node-syntax-error/issues
Source: https://github.com/substack/node-syntax-error
Files: *
-Copyright: 2017 James Halliday <mail at substack.net> (http://substack.net)
+Copyright: 2012-2017 James Halliday <mail at substack.net> (http://substack.net)
License: Expat
Files: debian/*
diff --git a/debian/tests/control b/debian/tests/control
index 38aeb76..047f324 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
Tests: require
Depends: node-syntax-error
+
+Tests: runtestsuite
+Depends: node-syntax-error, node-tap (>= 1.1)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..1c59f93
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='syntax-error'
+SEDCMD="s,require\s*[(]\s*['\"][.][.]/?[\"']\s*[)],require('$PACKAGE'),g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test/ $tmpdir/test
+find test/ -name '*.js' -print0 | \
+ xargs -0 -n1 \
+ sh -c 'set -e; echo "Create: $3"; sed -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+
+tap $tmpdir/test/*.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-syntax-error.git
More information about the Pkg-javascript-commits
mailing list