Commit 77db14be authored by Ross Gammon's avatar Ross Gammon

Patch upstream tests to get them working

node = nodejs in Debian!
parent e0b7909a
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@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!');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment