[Pkg-javascript-commits] [node-lexical-scope] 19/83: failing shebang test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:47 UTC 2017


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

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

commit dab976dd41e206d98857c0a36a0b0c9485b2ccf2
Author: James Halliday <mail at substack.net>
Date:   Sun Feb 24 16:34:05 2013 -0800

    failing shebang test
---
 test/shebang.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/shebang.js b/test/shebang.js
new file mode 100644
index 0000000..db3b1b5
--- /dev/null
+++ b/test/shebang.js
@@ -0,0 +1,16 @@
+var test = require('tape');
+var detect = require('../');
+var src = '#!/beep/boop blah\n' + require('./sources/detect.js');
+
+test('shebangs', function (t) {
+    t.plan(3);
+    
+    var scope = detect(src);
+    t.same(scope.globals.implicit, [
+        'w', 'foo', 'process', 'console', 'AAA', 'BBB', 'CCC', 'xyz'
+    ]);
+    t.same(scope.globals.exported, [
+        'w', 'RAWR', 'BLARG', 'ZZZ'
+    ]);
+    t.same(scope.locals[''], [ 'x', 'y', 'z', 'beep' ]);
+});

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



More information about the Pkg-javascript-commits mailing list