Skip to content

Commit

Permalink
shebang path space
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 committed Sep 30, 2018
1 parent 7931ab5 commit b7d2e97
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
36 changes: 18 additions & 18 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
environment:
matrix:
- nodejs_version: '8'
- nodejs_version: '6'
- nodejs_version: '4'
install:
- ps: Install-Product node $env:nodejs_version
- npm -g install npm@latest
- set PATH=%APPDATA%\npm;%PATH%
- npm install
matrix:
fast_finish: true
build: off
version: '{build}'
shallow_clone: true
clone_depth: 1
test_script:
- npm test
environment:
matrix:
- nodejs_version: '8'
- nodejs_version: '6'
- nodejs_version: '4'
install:
- ps: Install-Product node $env:nodejs_version
- npm -g install npm@lts
- set PATH=%APPDATA%\npm;%PATH%
- npm install
matrix:
fast_finish: true
build: off
version: '{build}'
shallow_clone: true
clone_depth: 1
test_script:
- npm test
16 changes: 15 additions & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (process.argv[2] === 'parent') {
console.log('EXIT %j', [code, signal])
})
var argv = process.argv.slice(3).map(function (arg) {
if (arg === fixture) {
if (path.resolve(arg) === fixture) {
return '{{FIXTURE}}'
}
return arg
Expand Down Expand Up @@ -271,6 +271,20 @@ t.test('exec execPath', function (t) {
})
})

t.test('windows shebang', function (t) {
var child = cp.spawn('env', [fixture, 'xyz'])
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.equal(out, expect)
t.end()
})
})

t.test('exec shebang', { skip: winNoShebang }, function (t) {
t.plan(3)

Expand Down

0 comments on commit b7d2e97

Please sign in to comment.