[Pkg-javascript-commits] [node-unicode-tr51] 01/01: Fix d/tests/mocha
Julien Puydt
julien.puydt at laposte.net
Thu Aug 24 20:28:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-unicode-tr51.
commit 8f06db538bad359b02decba16d795c89228b3cb8
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Thu Aug 24 22:06:25 2017 +0200
Fix d/tests/mocha
---
debian/tests/mocha | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/debian/tests/mocha b/debian/tests/mocha
index 850c1a3..176e3df 100644
--- a/debian/tests/mocha
+++ b/debian/tests/mocha
@@ -1,15 +1,14 @@
#!/bin/sh
set -e
-# notice the / at end in order to load this module
PACKAGE='unicode-tr51'
-SEDCMD1="s,require\s*[(]\s*[\"][.][.]/unicode-tr51[\"'],require(\"$PACKAGE/\",g"
-SEDCMD2="s,require\s*[(]\s*[\"'][.][.][\"'],require('$PACKAGE',g"
+SEDCMD1="s,require\s*[(]\s*['][.][.]/,require('$PACKAGE/,g"
+SEDCMD2="s,require\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 | \
+cp -r tests/ $tmpdir/tests
+find tests/ -name '*.js' -print0 | \
xargs -0 -n1 \
sh -c 'set -e; echo "Create: $5"; sed -E -e "$1" -e "$2" < "$4" > "$3/$4"' sedtape "$SEDCMD1" "$SEDCMD2" "$tmpdir"
-mocha $tmpdir/test/test.js
+mocha $tmpdir/tests/tests.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-unicode-tr51.git
More information about the Pkg-javascript-commits
mailing list