diff options
Diffstat (limited to 'tests/ui/meta/auxiliary/env.rs')
-rw-r--r-- | tests/ui/meta/auxiliary/env.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/meta/auxiliary/env.rs b/tests/ui/meta/auxiliary/env.rs new file mode 100644 index 000000000..b3644d8d5 --- /dev/null +++ b/tests/ui/meta/auxiliary/env.rs @@ -0,0 +1,9 @@ +// Check that aux builds can also use rustc-env, but environment is configured +// separately from the main test case. +// +// rustc-env:COMPILETEST_BAR=bar + +pub fn test() { + assert_eq!(option_env!("COMPILETEST_FOO"), None); + assert_eq!(env!("COMPILETEST_BAR"), "bar"); +} |