blob: afc64c1f91d7764081981e27fc531a9b293997e2 [file] [log] [blame]
Andrew Gerrandfc32bfa2013-07-30 09:42:53 +10001#!/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
6set -e
7
8function fail {
9 echo FAIL: doc/codewalk/$1
10 exit 1
11}
12
13# markov.xml
14echo foo | go run markov.go | grep foo > /dev/null || fail markov
15
16# functions.xml
17go 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 Kortschak64cb2cf2013-08-01 11:03:13 +100020go build urlpoll.go || fail urlpoll
21rm -f urlpoll