summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2020-05-04 18:23:34 -0400
committerClementTsang <cjhtsang@uwaterloo.ca>2020-05-04 18:23:34 -0400
commit1ff2606c90c0b0ce10912f03f01314e209b54574 (patch)
treeb5df1b2a6f4e462dd3767f4422bfb47d38cfe034 /tests
parent16b6f442ac955bf60fa680f7177bf5fc75b6c27b (diff)
update tests to deal with msrv
Diffstat (limited to 'tests')
-rw-r--r--tests/arg_tests.rs11
-rw-r--r--tests/invalid_config_tests.rs11
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/arg_tests.rs b/tests/arg_tests.rs
index 134d9615..c586a798 100644
--- a/tests/arg_tests.rs
+++ b/tests/arg_tests.rs
@@ -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]
diff --git a/tests/invalid_config_tests.rs b/tests/invalid_config_tests.rs
index 34b8e06e..0a0f69a4 100644
--- a/tests/invalid_config_tests.rs
+++ b/tests/invalid_config_tests.rs
@@ -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]