1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#!/bin/sh
set -e
# notice the / at end in order to load this module
PACKAGE='browserify-zlib/'
SEDCMD="s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('$PACKAGE'),g"
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
cp -r test "$tmpdir/test"
find test/ -maxdepth 1 -name '*.js' -print0 | \
xargs -0 -n1 \
sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
cd "$tmpdir"
convert rose: test/fixtures/person.jpg
gzip -9 -n < test/fixtures/person.jpg > test/fixtures/person.jpg.gz
tap -R spec test/test-*.js
|