Skip to content

Commit

Permalink
A test of .npmignore file behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 10, 2011
1 parent 3f78ca8 commit 1b0194a
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions test/packages/npmignore/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*/bar
.dotfile
.dotglob*
1 change: 1 addition & 0 deletions test/packages/npmignore/foo/bar
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar
Empty file added test/packages/npmignore/foo/baz
Empty file.
4 changes: 4 additions & 0 deletions test/packages/npmignore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ "name" : "npmignore"
, "version" : "1.2.3"
, "files" : ["foo", "test.sh", ""]
, "scripts" : {"test":"./test.sh"}}
14 changes: 14 additions & 0 deletions test/packages/npmignore/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -x
set -e

if [[ $npm_package_version == "9999.0.0-LINK-"* ]]; then
echo "link package, skipping test"
exit 0
fi

[ -f ./foo/baz ] \
&& ! [ -f ./foo/bar ] \
&& [ -f ./.dot-keeper ] \
&& ! [ -f ./.dot-glob-a ]

0 comments on commit 1b0194a

Please sign in to comment.