Skip to content

Commit ec5875e

Browse files
committed
normalize paths on windows in tests
1 parent 69f040b commit ec5875e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/index.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ async fn test_files() {
5050
for entry in std::fs::read_dir(path).unwrap() {
5151
let entry = entry.unwrap();
5252
let test_file_path = entry.path();
53+
let test_file_path_string = test_file_path.to_string_lossy().replace('\\', "/");
5354
let stem = test_file_path.file_stem().unwrap().to_str().unwrap();
5455
if test_file_path.extension().unwrap_or_default() != "sql" {
5556
continue;
5657
}
57-
let req_str = format!("/{}?x=1", test_file_path.display());
58+
let req_str = format!("/{}?x=1", test_file_path_string);
5859
let resp = req_path(&req_str).await.unwrap();
5960
let body = test::read_body(resp).await;
6061
assert!(body.starts_with(b"<!DOCTYPE html>"));

0 commit comments

Comments
 (0)