Skip to content

Commit

Permalink
Fix wasmer_run_complex_url on Windows GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Nov 25, 2022
1 parent 1969692 commit 6d559c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/cli/tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,16 @@ fn run_no_start_wasm_report_error() -> anyhow::Result<()> {
fn test_wasmer_run_complex_url() -> anyhow::Result<()> {
let wasm_test_path = wasi_test_wasm_path();
let wasm_test_path = wasm_test_path.canonicalize().unwrap_or(wasm_test_path);
let mut wasm_test_path = format!("{}", wasm_test_path.display());
if wasm_test_path.starts_with(r#"\\?\"#) {
wasm_test_path = wasm_test_path.replacen(r#"\\?\"#, "", 1);
}
#[cfg(target_os = "windows")]
{
// wasmer run used to fail on c:\Users\username\wapm_packages\ ...
println!("wasm test path: {}", wasm_test_path.display());
assert!(
wasm_test_path.starts_with("c:\\") || wasm_test_path.starts_with("C://"),
wasm_test_path.contains(":\\"),
"wasm_test_path path is not complex enough"
);
}
Expand Down

0 comments on commit 6d559c2

Please sign in to comment.