]> git.lizzy.rs Git - rust.git/blob - src/test/ui/meta/auxiliary/env.rs
Add a test for compiletest rustc-env & unset-rustc-env directives
[rust.git] / src / test / ui / meta / auxiliary / env.rs
1 // Check that aux builds can also use rustc-env, but environment is configured
2 // separately from the main test case.
3 //
4 // rustc-env:COMPILETEST_BAR=bar
5
6 pub fn test() {
7     assert_eq!(option_env!("COMPILETEST_FOO"), None);
8     assert_eq!(env!("COMPILETEST_BAR"), "bar");
9 }