Skip to content

Commit

Permalink
Fix test cases failing on Windows
Browse files Browse the repository at this point in the history
Require >= nihtest-1.6 for testing and use its new "stdout-replace"
feature to map the differing directory separator back to "/" (for
the 4 tests that use zip files in subdirectories).
Remove the affected tests from XFAIL_TESTS (all tests pass now).
  • Loading branch information
miller-alex committed Apr 10, 2024
1 parent d097c5a commit f3c4388
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ else()
endif()

find_program(NIHTEST nihtest)
set(NIHTEST_REQUIRED_VERSION "1.5")
set(NIHTEST_REQUIRED_VERSION "1.6")

option(RUN_REGRESS "Run regression tests" ON)

Expand Down
8 changes: 0 additions & 8 deletions regress/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
set(XFAIL_TESTS
)
if(WIN32)
set(XFAIL_TESTS ${XFAIL_TESTS}
cli-q.test
cli-s.test
recurse.test
recursive.test
)
endif()

if(RUN_REGRESS)
file(GLOB TEST_CASES ${CMAKE_CURRENT_SOURCE_DIR}/*.test)
Expand Down
2 changes: 2 additions & 0 deletions regress/cli-q.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ file dir/another.zip small.zip small.tzip
file dir/moretorrentzip.zip small.tzip small.tzip
file dir/sub/one.zip small.zip small.tzip
file dir/sub/torrentzip.zip small.tzip small.tzip
stdout-replace '(dir)\\\\' '\1/'
stdout-replace '(sub)\\\\' '\1/'
stdout
Rezipping - dir/another.zip
--------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions regress/cli-s.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ file dir/another.zip small.zip small.tzip
file dir/moretorrentzip.zip small.tzip small.tzip
file dir/sub/one.zip small.zip small.zip
file dir/sub/torrentzip.zip small.tzip small.tzip
stdout-replace '(dir)\\\\' '\1/'
stdout
Rezipping - dir/another.zip
--------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions regress/recurse.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ file dir/CaSe.ZiP small.zip small.tzip
file dir/p small.zip
file dir/skip.bin small.zip
file dir/sub/small.zip small.zip small.tzip
stdout-replace '(dir)\\\\' '\1/'
stdout-replace '(sub)\\\\' '\1/'
stdout
Rezipping - dir/CaSe.ZiP
--------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions regress/recursive.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ file dir/another.zip small.zip small.tzip
file dir/moretorrentzip.zip small.tzip small.tzip
file dir/sub/one.zip small.zip small.tzip
file dir/sub/torrentzip.zip small.tzip small.tzip
stdout-replace '(dir)\\\\' '\1/'
stdout-replace '(sub)\\\\' '\1/'
stdout
Rezipping - dir/another.zip
--------------------------------------------------
Expand Down

0 comments on commit f3c4388

Please sign in to comment.