[Pkg-javascript-commits] [node-cross-spawn-async] 04/07: Patch upstream tests to get them working

Ross Gammon ross-guest at moszumanska.debian.org
Wed Sep 23 20:03:16 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-async.

commit 77db14be484dca8d2f472cad5cdc1f545d472cb7
Author: Ross Gammon <rossgammon at mail.dk>
Date:   Wed Sep 23 21:48:10 2015 +0200

    Patch upstream tests to get them working
    
    node = nodejs in Debian!
---
 debian/patches/series         |  1 +
 debian/patches/test_fix.patch | 87 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..76d3b94
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+test_fix.patch
diff --git a/debian/patches/test_fix.patch b/debian/patches/test_fix.patch
new file mode 100644
index 0000000..392429c
--- /dev/null
+++ b/debian/patches/test_fix.patch
@@ -0,0 +1,87 @@
+Description: Fix tests - nodejs instead of node
+ In Debian, the node executable is named nodejs. To get the upstream tests
+ working it is necessary to replace all mentions of node with nodejs.
+Forwarded: not-needed
+Author: Ross Gammon <rossgammons at mail.dk>
+
+--- node-cross-spawn-async.orig/test/test.js
++++ node-cross-spawn-async/test/test.js
+@@ -45,7 +45,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!\');', {
+@@ -106,7 +106,7 @@
+     });
+ 
+     it('should handle empty arguments', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             'foo',
+             '',
+@@ -131,7 +131,7 @@
+     });
+ 
+     it('should handle non-string arguments', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             1234
+         ], function (err, data, code) {
+@@ -144,7 +144,7 @@
+     });
+ 
+     it('should handle arguments with spaces', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             'I am',
+             'André Cruz'
+@@ -158,7 +158,7 @@
+     });
+ 
+     it('should handle arguments with \\"', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             'foo',
+             '\\"',
+@@ -173,7 +173,7 @@
+     });
+ 
+     it('should handle arguments that end with \\', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             'foo',
+             'bar\\',
+@@ -188,7 +188,7 @@
+     });
+ 
+     it('should handle arguments that contain shell special chars', function (next) {
+-        buffered('node', [
++        buffered('nodejs', [
+             __dirname + '/fixtures/echo',
+             'foo',
+             '()',
+@@ -283,7 +283,7 @@
+     });
+ 
+     it('should give correct exit code', function (next) {
+-        buffered('node', [__dirname + '/fixtures/exit'], function (err, data, code) {
++        buffered('nodejs', [__dirname + '/fixtures/exit'], function (err, data, code) {
+             expect(err).to.not.be.ok();
+             expect(code).to.be(25);
+ 
+--- node-cross-spawn-async.orig/test/fixtures/shebang
++++ node-cross-spawn-async/test/fixtures/shebang
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env node
++#!/usr/bin/env nodejs
+ 
+ process.stdout.write('shebang works!');

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



More information about the Pkg-javascript-commits mailing list