From 1c3de0a680d7d7b687856f258537989f63fda53a Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Mon, 28 Jul 2025 17:14:13 +0400 Subject: [PATCH] test: check for exe --- src/bundler.rs | 2 +- tests/common/mod.rs | 4 ++-- tests/integration_test.rs | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/bundler.rs b/src/bundler.rs index 0a83eff..972cc75 100644 --- a/src/bundler.rs +++ b/src/bundler.rs @@ -1089,7 +1089,7 @@ fn resolve_output_path( } let ext = if Platform::current().is_windows() { - ".bat" + ".exe" } else { "" }; diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 4ced8ab..faab988 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -556,7 +556,7 @@ impl BundlerTestHelper { // Find the created executable let executable_name = custom_name.unwrap_or("test-project"); let executable_path = output_dir.join(if cfg!(windows) { - format!("{executable_name}.bat") + format!("{executable_name}.exe") } else { executable_name.to_string() }); @@ -564,7 +564,7 @@ impl BundlerTestHelper { // Check if collision avoidance was used if !executable_path.exists() || !executable_path.is_file() { let bundle_executable_path = output_dir.join(if cfg!(windows) { - format!("{executable_name}-bundle.bat") + format!("{executable_name}-bundle.exe") } else { format!("{executable_name}-bundle") }); diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 4d44f43..b536bb2 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -123,7 +123,7 @@ process.exit(0);"#; // Find the created executable let executable_path = temp_dir.path().join(if cfg!(windows) { - "integration-test-app.bat" + "integration-test-app.exe" } else { "integration-test-app" }); @@ -289,7 +289,7 @@ process.exit(0);"#; // Find and run the created executable to verify it uses the correct Node version let executable_name = if cfg!(target_os = "windows") { - "nvmrc-test-app.bat" + "nvmrc-test-app.exe" } else { "nvmrc-test-app" }; @@ -413,7 +413,7 @@ async fn test_output_path_collision_handling() -> Result<(), Box