Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/packages/npm-test-dir-bin')
-rw-r--r--test/packages/npm-test-dir-bin/bin/dir-bin2
-rw-r--r--test/packages/npm-test-dir-bin/package.json4
-rw-r--r--test/packages/npm-test-dir-bin/test.js5
3 files changed, 11 insertions, 0 deletions
diff --git a/test/packages/npm-test-dir-bin/bin/dir-bin b/test/packages/npm-test-dir-bin/bin/dir-bin
new file mode 100644
index 000000000..9558516aa
--- /dev/null
+++ b/test/packages/npm-test-dir-bin/bin/dir-bin
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+console.log('ok')
diff --git a/test/packages/npm-test-dir-bin/package.json b/test/packages/npm-test-dir-bin/package.json
new file mode 100644
index 000000000..1ea26323f
--- /dev/null
+++ b/test/packages/npm-test-dir-bin/package.json
@@ -0,0 +1,4 @@
+{ "name":"npm-test-dir-bin"
+, "version":"1.2.5"
+, "directories": { "bin": "./bin" }
+, "scripts": { "test": "node test.js" } }
diff --git a/test/packages/npm-test-dir-bin/test.js b/test/packages/npm-test-dir-bin/test.js
new file mode 100644
index 000000000..e4ee83f9e
--- /dev/null
+++ b/test/packages/npm-test-dir-bin/test.js
@@ -0,0 +1,5 @@
+require('child_process').spawn('dir-bin', [], {
+ env: process.env }).on('exit', function (code) {
+ if (code) throw new Error('exited badly with code = ' + code)
+})
+