Skip to content

Commit 48b7e4f

Browse files
(MAINT) Use cargo for tryWhich() test
Prior to this change, the `exe_exists()` test for the `tryWhich()` configuration function looked for `dsc`, which may not exist when the project has not successfully built yet. This change uses `cargo` instead, which is guaranteed to be available when this test is executed.
1 parent c4e2b6e commit 48b7e4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/dsc-lib/src/functions/try_which.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ mod tests {
5555
#[test]
5656
fn exe_exists() {
5757
let mut parser = Statement::new().unwrap();
58-
let result = parser.parse_and_execute("[tryWhich('dsc')]", &Context::new()).unwrap();
58+
let result = parser.parse_and_execute("[tryWhich('cargo')]", &Context::new()).unwrap();
5959
#[cfg(windows)]
60-
assert!(result.as_str().unwrap().to_lowercase().ends_with("\\dsc.exe"));
60+
assert!(result.as_str().unwrap().to_lowercase().ends_with("\\cargo.exe"));
6161
#[cfg(not(windows))]
62-
assert!(result.as_str().unwrap().ends_with("/dsc"));
62+
assert!(result.as_str().unwrap().ends_with("/cargo"));
6363
}
6464

6565
#[test]

0 commit comments

Comments
 (0)