about summary refs log tree commit diff
path: root/tests/ui/proc-macro/env.rs
blob: 94e3b09e5269b639121c10270093e8b74f08ed3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ proc-macro: env.rs
//@ run-pass
//@ rustc-env: THE_CONST=1
//@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4

#![crate_name = "foo"]

extern crate env;

use env::generate_const;

generate_const!();

fn main() {
    assert_eq!(THE_CONST, 12);
    assert_eq!(ANOTHER, 1);
}