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')
-rw-r--r--test/packages/npm-test-ignore/.npmignore7
-rw-r--r--test/packages/npm-test-ignore/ignore30
-rw-r--r--test/packages/npm-test-ignore/ignoredir1/a0
-rw-r--r--test/packages/npm-test-ignore/ignoredir2/a0
-rw-r--r--test/packages/npm-test-ignore/include40
-rw-r--r--test/packages/npm-test-ignore/package.json3
-rw-r--r--test/packages/npm-test-ignore/sub/ignore10
-rw-r--r--test/packages/npm-test-ignore/sub/ignore30
-rw-r--r--test/packages/npm-test-ignore/sub/include0
-rw-r--r--test/packages/npm-test-ignore/sub/include20
-rw-r--r--test/packages/npm-test-ignore/sub/include41
-rw-r--r--test/packages/npm-test-ignore/test.sh27
12 files changed, 38 insertions, 0 deletions
diff --git a/test/packages/npm-test-ignore/.npmignore b/test/packages/npm-test-ignore/.npmignore
new file mode 100644
index 000000000..c7d927d0a
--- /dev/null
+++ b/test/packages/npm-test-ignore/.npmignore
@@ -0,0 +1,7 @@
+/sub/ignore1
+./sub/include2
+ignore3
+./include4
+ignoredir1
+ignoredir2/
+*.tgz
diff --git a/test/packages/npm-test-ignore/ignore3 b/test/packages/npm-test-ignore/ignore3
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/ignore3
diff --git a/test/packages/npm-test-ignore/ignoredir1/a b/test/packages/npm-test-ignore/ignoredir1/a
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/ignoredir1/a
diff --git a/test/packages/npm-test-ignore/ignoredir2/a b/test/packages/npm-test-ignore/ignoredir2/a
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/ignoredir2/a
diff --git a/test/packages/npm-test-ignore/include4 b/test/packages/npm-test-ignore/include4
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/include4
diff --git a/test/packages/npm-test-ignore/package.json b/test/packages/npm-test-ignore/package.json
new file mode 100644
index 000000000..6d492de78
--- /dev/null
+++ b/test/packages/npm-test-ignore/package.json
@@ -0,0 +1,3 @@
+{ "name":"npm-test-ignore"
+, "version":"1.2.5"
+, "scripts":{"test":"bash test.sh"}}
diff --git a/test/packages/npm-test-ignore/sub/ignore1 b/test/packages/npm-test-ignore/sub/ignore1
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/sub/ignore1
diff --git a/test/packages/npm-test-ignore/sub/ignore3 b/test/packages/npm-test-ignore/sub/ignore3
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/sub/ignore3
diff --git a/test/packages/npm-test-ignore/sub/include b/test/packages/npm-test-ignore/sub/include
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/sub/include
diff --git a/test/packages/npm-test-ignore/sub/include2 b/test/packages/npm-test-ignore/sub/include2
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/packages/npm-test-ignore/sub/include2
diff --git a/test/packages/npm-test-ignore/sub/include4 b/test/packages/npm-test-ignore/sub/include4
new file mode 100644
index 000000000..d16969cd1
--- /dev/null
+++ b/test/packages/npm-test-ignore/sub/include4
@@ -0,0 +1 @@
+This file should be in the package.
diff --git a/test/packages/npm-test-ignore/test.sh b/test/packages/npm-test-ignore/test.sh
new file mode 100644
index 000000000..cdf47f211
--- /dev/null
+++ b/test/packages/npm-test-ignore/test.sh
@@ -0,0 +1,27 @@
+x=`find . | grep ignore | grep -v npmignore`
+if [ "$x" != "" ]; then
+ echo "ignored files included: $x"
+ exit 1
+fi
+
+x=`find . | grep -v ignore | sort`
+y=".
+./include4
+./package.json
+./sub
+./sub/include
+./sub/include2
+./sub/include4
+./test.sh"
+if [ "$x" != "$y" ]; then
+ echo "missing included files"
+ echo "got:"
+ echo "==="
+ echo "$x"
+ echo "==="
+ echo "wanted:"
+ echo "==="
+ echo "$y"
+ echo "==="
+ exit 1
+fi