[Pkg-javascript-commits] [node-cross-spawn] 06/07: Patch new tests in test.js to use nodejs instead of node in Debian

Ross Gammon ross-guest at moszumanska.debian.org
Sun Dec 13 18:11:50 UTC 2015


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

ross-guest pushed a commit to branch master
in repository node-cross-spawn.

commit 89731cf07ea140c1d954af2b3a084a1513973cba
Author: Ross Gammon <rossgammon at mail.dk>
Date:   Sun Dec 13 18:43:48 2015 +0100

    Patch new tests in test.js to use nodejs instead of node in Debian
---
 debian/patches/nodejs_test.patch | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/debian/patches/nodejs_test.patch b/debian/patches/nodejs_test.patch
index 0d59ab0..00ebd2a 100644
--- a/debian/patches/nodejs_test.patch
+++ b/debian/patches/nodejs_test.patch
@@ -6,6 +6,33 @@ Author: Ross Gammon <rossgammon at mail.dk>
 
 --- node-cross-spawn.orig/test/test.js
 +++ node-cross-spawn/test/test.js
+@@ -63,7 +63,7 @@
+             });
+ 
+             it('should support shebang in executables without /usr/bin/env', function (next) {
+-                var nodejs = which.sync('node');
++                var nodejs = which.sync('nodejs');
+                 var file = __dirname + '/fixtures/shebang_noenv';
+ 
+                 fs.writeFileSync(file, '#!' + nodejs + '\n\nprocess.stdout.write(\'shebang works!\');', {
+@@ -91,7 +91,7 @@
+             it('should support shebang in executables with relative path', function (next) {
+                 var executable = './' + path.relative(process.cwd(), __dirname + '/fixtures/shebang');
+ 
+-                fs.writeFileSync(__dirname + '/tmp/shebang', '#!/usr/bin/env node\n\nprocess.stdout.write(\'yeah\');', { mode: parseInt('0777', 8) });
++                fs.writeFileSync(__dirname + '/tmp/shebang', '#!/usr/bin/env nodejs\n\nprocess.stdout.write(\'yeah\');', { mode: parseInt('0777', 8) });
+                 process.env.PATH = path.normalize(__dirname + '/tmp/') + path.delimiter + process.env.PATH;
+ 
+                 buffered(method, executable, function (err, data, code) {
+@@ -104,7 +104,7 @@
+             });
+ 
+             it('should support shebang in executables with extensions', function (next) {
+-                fs.writeFileSync(__dirname + '/tmp/shebang.js', '#!/usr/bin/env node\n\nprocess.stdout.write(\'shebang with extension\');', { mode: parseInt('0777', 8) });
++                fs.writeFileSync(__dirname + '/tmp/shebang.js', '#!/usr/bin/env nodejs\n\nprocess.stdout.write(\'shebang with extension\');', { mode: parseInt('0777', 8) });
+                 process.env.PATH = path.normalize(__dirname + '/tmp/') + path.delimiter + process.env.PATH;
+ 
+                 buffered(method, __dirname + '/tmp/shebang.js', function (err, data, code) {
 @@ -156,7 +156,7 @@
              });
  

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



More information about the Pkg-javascript-commits mailing list