[Pkg-javascript-commits] [node-jsonstream] 02/06: Run cli

Bastien Roucariès rouca at moszumanska.debian.org
Sun Apr 16 22:14:40 UTC 2017


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

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

commit d02ede34a3d354e3835817fe392c65bf29f47bf6
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sat Apr 15 17:05:04 2017 +0200

    Run cli
---
 debian/rules              |  5 ++++-
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 18 ++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 88ab79b..8490c46 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,4 +23,7 @@ else
 	@echo '**********************************************************'
 endif
 
-
+#index.js is also an executable
+override_dh_fixperms:
+	dh_fixperms
+	chmod +x debian/node-jsonstream/usr/lib/nodejs/JSONStream/index.js
diff --git a/debian/tests/control b/debian/tests/control
index 51caf0d..b7ff1ed 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-jsonstream
+
+Tests: runtestsuite
+Depends: node-jsonstream
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..9dcc9e0
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='console-browserify'
+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
+for TEST in test/browser.js test/map.js test/null.js; do
+	tap $TEST;
+done

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



More information about the Pkg-javascript-commits mailing list