File: runtestsuite

package info (click to toggle)
node-browserify-zlib 0.2.0%2B20170820git8b3f0a862f6b%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 308 kB
  • sloc: makefile: 19; sh: 15
file content (17 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download
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