diff options
Diffstat (limited to 'libgo/go/os/env_test.go')
-rw-r--r-- | libgo/go/os/env_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libgo/go/os/env_test.go b/libgo/go/os/env_test.go index 04ff390727c..991fa4d0578 100644 --- a/libgo/go/os/env_test.go +++ b/libgo/go/os/env_test.go @@ -6,6 +6,7 @@ package os_test import ( . "os" + "reflect" "testing" ) @@ -57,3 +58,13 @@ func TestExpand(t *testing.T) { } } } + +func TestConsistentEnviron(t *testing.T) { + e0 := Environ() + for i := 0; i < 10; i++ { + e1 := Environ() + if !reflect.DeepEqual(e0, e1) { + t.Fatalf("environment changed") + } + } +} |