summaryrefslogtreecommitdiff
path: root/src/pkg/os/env_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/os/env_test.go')
-rw-r--r--src/pkg/os/env_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pkg/os/env_test.go b/src/pkg/os/env_test.go
index 04ff39072..991fa4d05 100644
--- a/src/pkg/os/env_test.go
+++ b/src/pkg/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")
+ }
+ }
+}