[Pkg-javascript-commits] [acorn] 02/02: Add walk.js

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 2 14:55:24 UTC 2017


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

rouca pushed a commit to branch master
in repository acorn.

commit 549c545a12ab17babcce2697525ea1d5c846085d
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Thu Nov 2 15:53:34 2017 +0100

    Add walk.js
---
 debian/tests/control      |  9 ++++++---
 debian/tests/require      |  2 +-
 debian/tests/runtestsuite |  2 +-
 debian/tests/walk.js      | 10 ++++++++++
 4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/debian/tests/control b/debian/tests/control
index a545b0c..c7e4835 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,8 +1,11 @@
 Tests: require
-Depends: node-acorn
+Depends: node-acorn, nodejs (>= 6)
 
 Tests: smoketest
-Depends: node-acorn
+Depends: node-acorn, nodejs (>= 6)
 
 Tests: runtestsuite
-Depends: node-acorn
+Depends: node-acorn, nodejs (>= 6)
+
+Tests: walk.js
+Depends: node-acorn, nodejs (>= 6)
diff --git a/debian/tests/require b/debian/tests/require
index a89f662..b71a0d7 100644
--- a/debian/tests/require
+++ b/debian/tests/require
@@ -1,3 +1,3 @@
 #!/bin/sh
 set -e
-nodejs -e "require('acorn');"
+node -e "require('acorn');"
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
index 5418a61..534af94 100755
--- a/debian/tests/runtestsuite
+++ b/debian/tests/runtestsuite
@@ -13,4 +13,4 @@ cp -r test/ $tmpdir/test
 find test/ -name '*.js' -print0 | \
     xargs -0 -n1  \
 	  sh -c 'set -e; echo "Create: $5"; sed -E -e "$1" -e "$2" -e "$3" < "$5" > "$4/$5"' sedtape "$SEDCMD1" "$SEDCMD2" "$SEDCMD3" "$tmpdir"
-nodejs $tmpdir/test/run.js
+node $tmpdir/test/run.js
diff --git a/debian/tests/walk.js b/debian/tests/walk.js
new file mode 100755
index 0000000..5c6e88a
--- /dev/null
+++ b/debian/tests/walk.js
@@ -0,0 +1,10 @@
+#!/usr/bin/node
+
+const acorn = require("acorn")
+const walk = require("acorn/dist/walk")
+
+walk.simple(acorn.parse("let x = 10"), {
+  Literal(node) {
+    console.log(`Found a literal: ${node.value}`)
+  }
+})

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



More information about the Pkg-javascript-commits mailing list