[Pkg-javascript-commits] [node-regjsparser] 03/03: Run simple test

Bastien Roucariès rouca at moszumanska.debian.org
Mon Sep 18 11:55:28 UTC 2017


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

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

commit 906022592576cf677a193f2000d6e8e1e0543052
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Sep 18 13:55:17 2017 +0200

    Run simple test
---
 debian/rules        | 6 +++---
 debian/tests/simple | 9 ++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/debian/rules b/debian/rules
index 574e33d..c8fc68b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,13 +36,13 @@ endef
 REPLACE_MARKER_FILE:=$(subst $(newline),,$(REPLACE_MARKER_FILE_RAW))
 
 # run pipe exit if first or second fail
-PIPESAFE=exec 3>&1 && error_first=$$( ( ( $(1) ; echo $$? >&3) | $(2) ) 3>&1) && test "X$$error_first" = "X0"
+PIPESAFE=exec 3>&1 && exec 4>&1 && error_first=$$( ( ( $(1) ; echo $$? >&3) | $(2) >&4 ) 3>&1)  && test "X$$error_first" = "X0"
 
 %:
 	dh $@
 
 override_dh_auto_configure:
-	#npm install unicode-10.0.0
+	# npm install unicode-10.0.0
 	dh_auto_configure
 
 dist:
@@ -58,7 +58,7 @@ override_dh_auto_build: dist/parser.js
 	dh_auto_build
 
 simple_test:
-	$(call PIPESAFE, sed "s/require('regjsparser')/require('.')/g" debian/tests/simple,sh)
+	$(call PIPESAFE, sed -e "s/require('regjsparser')/require('.')/g" -e "/^#\!.*/d" debian/tests/simple,node)
 
 override_dh_auto_test: simple_test
 
diff --git a/debian/tests/simple b/debian/tests/simple
index 2879302..697d9eb 100644
--- a/debian/tests/simple
+++ b/debian/tests/simple
@@ -1,3 +1,6 @@
-#!/bin/sh
-set -e
-node -e "parse=require('regjsparser').parse;ast=parse('a');ast.codePoint==97 || process.exit(1)"
+#!/bin/node
+parse=require('regjsparser').parse;
+ast=parse('a');
+process.stdout.write(JSON.stringify(ast));
+ast.codePoint==97 || process.exit(1);
+process.exit(0)

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



More information about the Pkg-javascript-commits mailing list