File: test_fix.patch

package info (click to toggle)
node-cross-spawn-async 2.2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 236 kB
  • ctags: 41
  • sloc: sh: 6; makefile: 4
file content (106 lines) | stat: -rw-r--r-- 3,476 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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
@@ -62,7 +62,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!\');', {
@@ -120,7 +120,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\');',
+        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;
 
@@ -173,7 +173,7 @@
     });
 
     it('should handle arguments with quotes', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             '"foo"',
             'foo"bar"foo',
@@ -187,7 +187,7 @@
     });
 
     it('should handle empty arguments', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             'foo',
             '',
@@ -212,7 +212,7 @@
     });
 
     it('should handle non-string arguments', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             1234,
         ], function (err, data, code) {
@@ -225,7 +225,7 @@
     });
 
     it('should handle arguments with spaces', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             'I am',
             'André Cruz',
@@ -239,7 +239,7 @@
     });
 
     it('should handle arguments with \\"', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             'foo',
             '\\"',
@@ -254,7 +254,7 @@
     });
 
     it('should handle arguments that end with \\', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             'foo',
             'bar\\',
@@ -269,7 +269,7 @@
     });
 
     it('should handle arguments that contain shell special chars', function (next) {
-        buffered('node', [
+        buffered('nodejs', [
             __dirname + '/fixtures/echo',
             'foo',
             '()',
@@ -364,7 +364,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,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 
 'use strict';