Skip to content

Commit

Permalink
test: fix running executables on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>
  • Loading branch information
threeal committed Oct 9, 2024
1 parent cde2d88 commit b3e2d7d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 7 additions & 2 deletions test/test_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ section("it should build a package")
endsection()

section("it should build the correct targets")
assert(EXISTS .cdeps/pkg/build/main)
assert_execute_process(.cdeps/pkg/build/main OUTPUT "Hello World!")
if(EXISTS .cdeps/pkg/build/main)
assert_execute_process(.cdeps/pkg/build/main OUTPUT "Hello World!")
elseif(EXISTS .cdeps/pkg/build/main.exe)
assert_execute_process(.cdeps/pkg/build/main.exe OUTPUT "Hello World!")
else()
fail("expected path" .cdeps/pkg/build/main "to exist")
endif()
endsection()
endsection()

Expand Down
9 changes: 8 additions & 1 deletion test/test_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ section("it should install a package")
endsection()

section("it should install the correct targets")
assert_execute_process(.cdeps/pkg/install/bin/main OUTPUT "Hello World!")
if(EXISTS .cdeps/pkg/install/bin/main)
assert_execute_process(.cdeps/pkg/install/bin/main OUTPUT "Hello World!")
elseif(EXISTS .cdeps/pkg/install/bin/main.exe)
assert_execute_process(
.cdeps/pkg/install/bin/main.exe OUTPUT "Hello World!")
else()
fail("expected path" .cdeps/pkg/install/bin/main "to exist")
endif()
endsection()
endsection()

Expand Down

0 comments on commit b3e2d7d

Please sign in to comment.