first commit
This commit is contained in:
commit
8c4dcae475
89 changed files with 24623 additions and 0 deletions
22
tests/run.sh
Executable file
22
tests/run.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
# Runs the tests in this directory. They are package main's own tests, and Go
|
||||
# only compiles those from the package's directory, so an overlay presents
|
||||
# them to the go tool as if they were there. Arguments go to "go test":
|
||||
#
|
||||
# tests/run.sh
|
||||
# tests/run.sh -run TestCorpus -v
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
root=$(pwd)
|
||||
overlay=$(mktemp)
|
||||
trap 'rm -f "$overlay"' EXIT
|
||||
{
|
||||
printf '{"Replace":{'
|
||||
sep=
|
||||
for f in tests/*_test.go; do
|
||||
printf '%s"%s/%s":"%s/%s"' "$sep" "$root" "${f#tests/}" "$root" "$f"
|
||||
sep=,
|
||||
done
|
||||
printf '}}\n'
|
||||
} >"$overlay"
|
||||
go test -overlay "$overlay" "$@" .
|
||||
Loading…
Add table
Add a link
Reference in a new issue