From ebcbc6539f60fe38c4bfe92945efb88c3fc722ad Mon Sep 17 00:00:00 2001 From: Jomy10 Date: Sat, 13 Jan 2024 13:35:39 +0100 Subject: [PATCH] fix some tests for windows --- tests/basic-c-commands/make.rb | 4 ++-- tests/basic-c-project/test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/basic-c-commands/make.rb b/tests/basic-c-commands/make.rb index d29554c..a27ce3b 100644 --- a/tests/basic-c-commands/make.rb +++ b/tests/basic-c-commands/make.rb @@ -10,7 +10,7 @@ OBJ_OUT = File.join(OUT, "obj") Beaver::def_dir OBJ_OUT -EXEC_NAME = "hello" +EXEC_NAME = "hello" + (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) ? ".exe" : "" cmd :build do call :build_objs @@ -28,6 +28,6 @@ end cmd :run do - sh File.join("./", OUT, EXEC_NAME) + sh File.join("./", OUT, EXEC_NAME ) end diff --git a/tests/basic-c-project/test.rb b/tests/basic-c-project/test.rb index 1b3731d..5be8cc1 100644 --- a/tests/basic-c-project/test.rb +++ b/tests/basic-c-project/test.rb @@ -15,7 +15,7 @@ def setup EXPECTED_MY_EXECUTABLE_ARTIFACTS = [ "out/MyExecutable/obj/bin_main.c.o", "out/MyExecutable/obj/bin_print.cpp.o", - "out/MyExecutable/MyExecutable" + "out/MyExecutable/MyExecutable" + (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) ? ".exe" : "" ].sort def test_build_library