diff options
author | Ayke van Laethem <[email protected]> | 2020-09-25 19:59:48 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-11-26 08:05:35 +0100 |
commit | 718746dd21dbd9ac5a93ee57e3fef42fa7a9fa57 (patch) | |
tree | ba7274a03dd3323ead4592e8cbe2e026dc91adc8 /testdata | |
parent | 6cbaed75c8f938a1dd1ae657b11adaeff7077c3e (diff) | |
download | tinygo-718746dd21dbd9ac5a93ee57e3fef42fa7a9fa57.tar.gz tinygo-718746dd21dbd9ac5a93ee57e3fef42fa7a9fa57.zip |
os: stub out support for some more features
This is necessary for the following:
- to make sure os/exec can be imported
- to make sure internal/testenv can be imported
The internal/testenv package (which imports os/exec) is used by a lot of
tests. By adding support for it, more tests can be run.
This commit adds a bunch of new packages that now pass all tests.
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/env.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testdata/env.go b/testdata/env.go index 115da6d3d..79f4885ee 100644 --- a/testdata/env.go +++ b/testdata/env.go @@ -13,6 +13,17 @@ func main() { } println("ENV2:", v) + found := false + expected := "ENV1=" + os.Getenv("ENV1") + for _, envVar := range os.Environ() { + if envVar == expected { + found = true + } + } + if !found { + println("could not find " + expected + " in os.Environ()") + } + // Check for command line arguments. // Argument 0 is skipped because it is the program name, which varies by // test run. |