File: nodejs_test.patch

package info (click to toggle)
node-cross-spawn 5.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 320 kB
  • sloc: makefile: 6; sh: 6
file content (107 lines) | stat: -rw-r--r-- 4,800 bytes parent folder | download
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
107
Description: Fix test.js to use nodejs
 In Debian, nodejs is the name of the node executable. This fix was
 required to enable the upstream tests to pass.
Forwarded: not-needed
Author: Ross Gammon <rossgammon@mail.dk>

--- node-cross-spawn.orig/test/test.js
+++ node-cross-spawn/test/test.js
@@ -58,7 +58,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\');',
+                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;
 
@@ -74,7 +74,7 @@
             it('should support shebang in executables with relative path that starts with `..`', function (next) {
                 var executable = '../' + path.basename(process.cwd()) + '/' + path.relative(process.cwd(), __dirname + '/fixtures/shebang');
 
-                fs.writeFileSync(__dirname + '/tmp/shebang', '#!/usr/bin/env node\n\nprocess.stdout.write(\'yeah\');',
+                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;
 
@@ -88,7 +88,7 @@
             });
 
             it('should support shebang in executables with extensions', function (next) {
-                fs.writeFileSync(__dirname + '/tmp/shebang_' + method + '.js', '#!/usr/bin/env node\n\nprocess.stdout.write(\'shebang with \
+                fs.writeFileSync(__dirname + '/tmp/shebang_' + method + '.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;
 
@@ -141,7 +141,7 @@
             });
 
             it('should handle arguments with quotes', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     '"foo"',
                     'foo"bar"foo',
@@ -155,7 +155,7 @@
             });
 
             it('should handle empty arguments', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     'foo',
                     '',
@@ -180,7 +180,7 @@
             });
 
             it('should handle non-string arguments', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     1234,
                 ], function (err, data, code) {
@@ -193,7 +193,7 @@
             });
 
             it('should handle arguments with spaces', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     'I am',
                     'André Cruz',
@@ -207,7 +207,7 @@
             });
 
             it('should handle arguments with \\"', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     'foo',
                     '\\"',
@@ -222,7 +222,7 @@
             });
 
             it('should handle arguments that end with \\', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     'foo',
                     'bar\\',
@@ -237,7 +237,7 @@
             });
 
             it('should handle arguments that contain shell special chars', function (next) {
-                buffered(method, 'node', [
+                buffered(method, 'nodejs', [
                     __dirname + '/fixtures/echo',
                     'foo',
                     '()',
@@ -330,7 +330,7 @@
             });
 
             it('should give correct exit code', function (next) {
-                buffered(method, 'node', [__dirname + '/fixtures/exit'], function (err, data, code) {
+                buffered(method, 'nodejs', [__dirname + '/fixtures/exit'], function (err, data, code) {
                     expect(err).to.not.be.ok();
                     expect(code).to.be(25);