update tests to deal with msrv

This commit is contained in:
ClementTsang 2020-05-04 18:23:34 -04:00
parent 16b6f442ac
commit 1ff2606c90
3 changed files with 20 additions and 3 deletions

View file

@ -15,7 +15,6 @@ name = "btm"
path = "src/main.rs"
[profile.release]
#debug = true
debug = 1
opt-level = 3
lto = "fat"

View file

@ -7,7 +7,16 @@ use std::process::Command;
//======================RATES======================//
fn get_binary_location() -> String {
env!("CARGO_BIN_EXE_btm").to_string()
// env!("CARGO_BIN_EXE_btm").to_string()
if cfg!(target_os = "linux") {
"./target/x86_64-unknown-linux-gnu/debug/btm".to_string()
} else if cfg!(target_os = "windows") {
"./target/x86_64-pc-windows-msvc/debug/btm".to_string()
} else if cfg!(target_os = "macos") {
"./target/x86_64-apple-darwin/debug/btm".to_string()
} else {
"".to_string()
}
}
#[test]

View file

@ -5,7 +5,16 @@ use std::process::Command;
// These tests are for testing some config file-specific options.
fn get_binary_location() -> String {
env!("CARGO_BIN_EXE_btm").to_string()
// env!("CARGO_BIN_EXE_btm").to_string()
if cfg!(target_os = "linux") {
"./target/x86_64-unknown-linux-gnu/debug/btm".to_string()
} else if cfg!(target_os = "windows") {
"./target/x86_64-pc-windows-msvc/debug/btm".to_string()
} else if cfg!(target_os = "macos") {
"./target/x86_64-apple-darwin/debug/btm".to_string()
} else {
"".to_string()
}
}
#[test]