Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Test for #1888
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Dec 16, 2011
1 parent 428d963 commit 144b26a
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/packages/npm-test-files/.npmignore
@@ -0,0 +1,7 @@
/sub/ignore1
./sub/include2
ignore3
./include4
ignoredir1
ignoredir2/
*.tgz
Empty file.
Empty file.
Empty file.
Empty file.
9 changes: 9 additions & 0 deletions test/packages/npm-test-files/package.json
@@ -0,0 +1,9 @@
{ "name":"npm-test-files"
, "version":"1.2.5"
, "files":
[ "include4"
, "sub/include"
, "sub/include2"
, "sub/include4"
, "test.sh" ]
, "scripts":{"test":"bash test.sh"}}
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions test/packages/npm-test-files/sub/include4
@@ -0,0 +1 @@
This file should be in the package.
27 changes: 27 additions & 0 deletions test/packages/npm-test-files/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

0 comments on commit 144b26a

Please sign in to comment.