File: runtestsuite

package info (click to toggle)
node-object-inspect 1.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 208 kB
  • sloc: makefile: 15; sh: 12
file content (15 lines) | stat: -rwxr-xr-x 485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -e
# notice the / at end in order to load this module
PACKAGE='object-inspect'
SEDCMD="s,require\s*[(]\s*'[.][.]/?([^']*)'\s*[)],require('$PACKAGE/\1'),g"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP

cp -r test/ $tmpdir/test
find test/ -name '*.js' -print0 | \
    xargs -0 -n1  \
	  sh -c 'set -e; echo "Create: $3"; sed -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
# avoid false that does not work outside build dir
tape $tmpdir/test/*.js