diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
|---|---|---|
| committer | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
| commit | 64d2a7c8945ba05af859901f5e248f1befdd8621 (patch) | |
| tree | 013fcb7e9e3296ecdda876012252c36bd6bcb063 /doc/articles/wiki/test.bash | |
| parent | b901efe83e212f0c34c769c079e41373da12d723 (diff) | |
| download | golang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz | |
Imported Upstream version 1.2upstream/1.2
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 |
