X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fzipper_test.cc;h=c3f6ef7281140769220ab20489d190a44869942c;hb=e0a70cd5cfb11fc2de167f3146acdd437a6faa82;hp=10ffd76a4fc5bbe3d7623e44895a73e02f9a9129;hpb=ec04e5a068b8040d47fa125b8414a49a34f7b1a6;p=dcpomatic.git diff --git a/test/zipper_test.cc b/test/zipper_test.cc index 10ffd76a4..c3f6ef728 100644 --- a/test/zipper_test.cc +++ b/test/zipper_test.cc @@ -19,7 +19,7 @@ */ /** @file test/zipper_test.cc - * @brief Tests of Zipper class. + * @brief Test Zipper class. * @ingroup selfcontained */ @@ -42,7 +42,15 @@ BOOST_AUTO_TEST_CASE (zipper_test1) zipper.close (); boost::filesystem::remove_all ("build/test/zipper_test1", ec); +#ifdef DCPOMATIC_WINDOWS + /* unzip on windows crashes every so often (with a return code -1073740940, for some reason) + * so try using the built-in tar which can unzip things. + */ + boost::filesystem::create_directories ("build/test/zipper_test1"); + int const r = system ("tar -xf build\\test\\zipped.zip -C build\\test\\zipper_test1"); +#else int const r = system ("unzip build/test/zipped.zip -d build/test/zipper_test1"); +#endif BOOST_REQUIRE_EQUAL (r, 0); BOOST_CHECK_EQUAL (dcp::file_to_string("build/test/zipper_test1/foo.txt"), "1234567890");