Skip to content

Commit

Permalink
Add simple test checking rustflags works
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Sep 4, 2019
1 parent 48d9f13 commit 657b296
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/rustflags.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extern crate autocfg;

/// Tests that autocfg uses the RUSTFLAGS environment variable when running
/// rustc.
#[test]
fn test_with_sysroot() {
std::env::set_var("RUSTFLAGS", "-L target/debug/deps");
std::env::set_var("OUT_DIR", "target");
let ac = autocfg::AutoCfg::new().unwrap();
assert!(ac.probe_sysroot_crate("autocfg"));
}

0 comments on commit 657b296

Please sign in to comment.