1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
/*extern crate executable_path;
use {executable_path::executable_path, std::process::Command};
#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))]
static EXPECTED: &str = r#"arch: x86_64
os: linux
family: unix
env: gnu
endian: little
pointer_width: 64
vendor: unknown
feature: ["fxsr", "sse", "sse2"]
"#;
#[cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))]
static EXPECTED: &str = r#"arch: x86_64
os: windows
family: windows
env: msvc
endian: little
pointer_width: 64
vendor: pc
feature: ["fxsr", "sse", "sse2"]
"#;
#[cfg(all(target_arch = "x86_64", target_os = "macos", target_env = ""))]
static EXPECTED: &str = r#"arch: x86_64
os: macos
family: unix
env:
endian: little
pointer_width: 64
vendor: apple
feature: ["fxsr", "sse", "sse2", "sse3", "ssse3"]
"#;
#[cfg(all(target_arch = "aarch64", target_os = "macos", target_env = ""))]
static EXPECTED: &str = r#"arch: aarch64
os: macos
family: unix
env:
endian: little
pointer_width: 64
vendor: apple
feature: []
"#;
#[test]
fn binary_output() {
let output = Command::new(executable_path("target"))
.output()
.unwrap()
.stdout;
let output = std::str::from_utf8(&output).unwrap();
pretty_assertions::assert_eq!(output, EXPECTED);
}*/
|