2020-09-12 06:52:05 -05:00
|
|
|
use std::env;
|
|
|
|
|
2022-07-22 19:53:31 -05:00
|
|
|
use byteorder::{ByteOrder, LittleEndian};
|
|
|
|
|
2020-09-12 06:52:05 -05:00
|
|
|
fn main() {
|
|
|
|
println!("subcrate testing");
|
|
|
|
|
|
|
|
// CWD should be crate root.
|
2020-09-12 09:01:33 -05:00
|
|
|
// We have to normalize slashes, as the env var might be set for a different target's conventions.
|
|
|
|
let env_dir = env::current_dir().unwrap();
|
|
|
|
let env_dir = env_dir.to_string_lossy().replace("\\", "/");
|
|
|
|
let crate_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap();
|
|
|
|
let crate_dir = crate_dir.to_string_lossy().replace("\\", "/");
|
2020-09-12 06:52:05 -05:00
|
|
|
assert_eq!(env_dir, crate_dir);
|
2020-09-18 05:12:02 -05:00
|
|
|
|
2022-07-22 19:53:31 -05:00
|
|
|
// Make sure we can call dev-dependencies.
|
|
|
|
let _n = <LittleEndian as ByteOrder>::read_u32(&[1, 2, 3, 4]);
|
2020-09-12 06:52:05 -05:00
|
|
|
}
|