run 563 B

123456789101112131415161718192021
  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. set -e
  6. function fail {
  7. echo FAIL: doc/codewalk/$1
  8. exit 1
  9. }
  10. # markov.xml
  11. echo foo | go run markov.go | grep foo > /dev/null || fail markov
  12. # functions.xml
  13. go run pig.go | grep 'Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)' > /dev/null || fail pig
  14. # sharemem.xml: only build the example, as it uses the network
  15. go build urlpoll.go || fail urlpoll
  16. rm -f urlpoll