]> Cypherpunks repositories - gostls13.git/commit
os: rewrite LookupEnv's test
authorRob Pike <r@golang.org>
Wed, 6 May 2015 15:26:51 +0000 (08:26 -0700)
committerRob Pike <r@golang.org>
Wed, 6 May 2015 16:02:32 +0000 (16:02 +0000)
commit072a26331ae4d7d6f7cbcd76465dd79c0e22ab79
tree778912383f8300d53088fbffee036f91b5c473be
parentf09a660eab357ce1030261682048bbe119589d84
os: rewrite LookupEnv's test

GOROOT is not dependably set.

When I first wrote this test, I thought it was a waste of time
because the function can't fail if the other environment functions
work, but I didn't want to add functionality without testing it.
Of course, the test broke, and I learned something: GOROOT is not
set on iOS or, to put it more broadly, the world continues to
surprise me with its complexity and horror, such as a version of
cat with syntax coloring.

In that vein, I built this test around smallpox.

Change-Id: Ifa6c218a927399d05c47954fdcaea1015e558fb6
Reviewed-on: https://go-review.googlesource.com/9791
Reviewed-by: Russ Cox <rsc@golang.org>
src/os/env_test.go