Commit ddcdbd44 authored by Ian Lance Taylor's avatar Ian Lance Taylor

os: Fix test to work on Solaris.

On Solaris /bin is a symlink to /usr/bin, so running "pwd" in
the directory "/bin" prints out "/usr/bin".

R=rsc, r, bradfitz
CC=golang-dev
https://golang.org/cl/4559043
parent c4918db8
......@@ -442,7 +442,8 @@ func exec(t *testing.T, dir, cmd string, args []string, expect string) {
var b bytes.Buffer
io.Copy(&b, r)
output := b.String()
if output != expect {
// Accept /usr prefix because Solaris /bin is symlinked to /usr/bin.
if output != expect && output != "/usr"+expect {
t.Errorf("exec %q returned %q wanted %q",
strings.Join(append([]string{cmd}, args...), " "), output, expect)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment