diff options
Diffstat (limited to 'doc/articles/wiki/test.bash')
-rwxr-xr-x | doc/articles/wiki/test.bash | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/articles/wiki/test.bash b/doc/articles/wiki/test.bash index 02ed1894a..54a632c30 100755 --- a/doc/articles/wiki/test.bash +++ b/doc/articles/wiki/test.bash @@ -7,10 +7,17 @@ set -e wiki_pid= cleanup() { kill $wiki_pid - rm -f test_*.out Test.txt final-test.bin final-test.go + rm -f test_*.out Test.txt final-test.bin final-test.go a.out get.bin } trap cleanup 0 INT +# If called with -all, check that all code snippets compile. +if [ "$1" == "-all" ]; then + for fn in *.go; do + go build -o a.out $fn + done +fi + go build -o get.bin get.go addr=$(./get.bin -addr) sed s/:8080/$addr/ < final.go > final-test.go |