From b3862c1edea4c9bb1fc4af296ceab713f53dc48e Mon Sep 17 00:00:00 2001 From: Peefy Date: Sat, 14 Sep 2024 20:26:14 +0800 Subject: [PATCH] fix: windows CI and rust version to 1.80 (#1652) fix: override file windows test CI Signed-off-by: peefy --- kclvm/query/src/tests.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kclvm/query/src/tests.rs b/kclvm/query/src/tests.rs index 90876f650..401cdde2c 100644 --- a/kclvm/query/src/tests.rs +++ b/kclvm/query/src/tests.rs @@ -13,8 +13,14 @@ const CARGO_FILE_PATH: &str = env!("CARGO_MANIFEST_DIR"); fn get_test_dir(sub: String) -> PathBuf { let mut cargo_file_path = PathBuf::from(CARGO_FILE_PATH); - cargo_file_path.push("src/test_data"); - cargo_file_path.push(sub); + cargo_file_path.push("src"); + cargo_file_path.push("test_data"); + // Split unix and windows path + for part in sub.split("/") { + for p in part.split("\\") { + cargo_file_path.push(p); + } + } cargo_file_path }