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
path: root/test
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-01-06 02:03:55 +0300
committerisaacs <i@izs.me>2011-01-06 02:04:59 +0300
commitf24f4d04811a7d0fc0b3afb27b641673e1b2e555 (patch)
treecf409e27dd36a7937cf848a7155e8fc2ad33a27b /test
parent4a435d3d730d3f2830a68e20800ed0919e879f76 (diff)
A test for the files array
Diffstat (limited to 'test')
-rw-r--r--test/packages/files-array-simple/bar1
-rw-r--r--test/packages/files-array-simple/foo1
-rw-r--r--test/packages/files-array-simple/package.json4
-rwxr-xr-xtest/packages/files-array-simple/test.sh7
4 files changed, 13 insertions, 0 deletions
diff --git a/test/packages/files-array-simple/bar b/test/packages/files-array-simple/bar
new file mode 100644
index 000000000..5716ca598
--- /dev/null
+++ b/test/packages/files-array-simple/bar
@@ -0,0 +1 @@
+bar
diff --git a/test/packages/files-array-simple/foo b/test/packages/files-array-simple/foo
new file mode 100644
index 000000000..257cc5642
--- /dev/null
+++ b/test/packages/files-array-simple/foo
@@ -0,0 +1 @@
+foo
diff --git a/test/packages/files-array-simple/package.json b/test/packages/files-array-simple/package.json
new file mode 100644
index 000000000..a5f17f883
--- /dev/null
+++ b/test/packages/files-array-simple/package.json
@@ -0,0 +1,4 @@
+{ "name" : "files-array-simple"
+, "version" : "1.2.3"
+, "files" : ["foo", "test.sh"]
+, "scripts" : {"test":"./test.sh"}}
diff --git a/test/packages/files-array-simple/test.sh b/test/packages/files-array-simple/test.sh
new file mode 100755
index 000000000..f0eb32196
--- /dev/null
+++ b/test/packages/files-array-simple/test.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -x
+set -e
+
+# test that there is a foo file, and that there is NOT a bar file
+[ -f ./foo ] && ! [ -f ./bar ]