1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:20:22 -07:00
go/doc/codewalk/run
Robert Daniel Kortschak 64cb2cf5cc doc: don't invoke go build with -o /dev/null during test
Fixes #5998.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/12149043
2013-08-01 11:03:13 +10:00

22 lines
563 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2013 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
function fail {
echo FAIL: doc/codewalk/$1
exit 1
}
# markov.xml
echo foo | go run markov.go | grep foo > /dev/null || fail markov
# functions.xml
go run pig.go | grep 'Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)' > /dev/null || fail pig
# sharemem.xml: only build the example, as it uses the network
go build urlpoll.go || fail urlpoll
rm -f urlpoll