Andrew Gerrand | fc32bfa | 2013-07-30 09:42:53 +1000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # Copyright 2013 The Go Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style |
| 4 | # license that can be found in the LICENSE file. |
| 5 | |
| 6 | set -e |
| 7 | |
| 8 | function fail { |
| 9 | echo FAIL: doc/codewalk/$1 |
| 10 | exit 1 |
| 11 | } |
| 12 | |
| 13 | # markov.xml |
| 14 | echo foo | go run markov.go | grep foo > /dev/null || fail markov |
| 15 | |
| 16 | # functions.xml |
| 17 | go run pig.go | grep 'Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)' > /dev/null || fail pig |
| 18 | |
| 19 | # sharemem.xml: only build the example, as it uses the network |
Robert Daniel Kortschak | 64cb2cf | 2013-08-01 11:03:13 +1000 | [diff] [blame] | 20 | go build urlpoll.go || fail urlpoll |
| 21 | rm -f urlpoll |