3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test that the Go environment variables are present and accessible through
8 // package os and package runtime.
18 ga := os.Getenv("GOARCH")
19 if ga != runtime.GOARCH {
20 print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n")
23 xxx := os.Getenv("DOES_NOT_EXIST")
25 print("$DOES_NOT_EXIST=", xxx, "\n")