sal/qa/osl/file/osl_File.cxx | 24 ------------------------ 1 file changed, 24 deletions(-)
New commits: commit cf2c1c28d7539c99b9b899da641c50ad21e1c210 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Dec 14 11:00:50 2021 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Dec 14 15:03:12 2021 +0100 Drop brittle test Not only did it not work on Windows (witness the #ifdef), it would also fail at least for Linux Flatpak builds (if they did make checks) where creating <file:////tmpname> happens to succeed with E_None. Change-Id: I9b82d500cb37fb80648407d2b4ade5ac85e97a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126831 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 09dedbb17bef..ebab41eb17bf 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -2216,29 +2216,6 @@ namespace osl_File File::E_NOENT, nError1); } - void open_004() - { - OUString aTestFile(aRootURL); - concatURL(aTestFile, aTmpName2); - File testFile(aTestFile); - - auto nError1 = testFile.open(osl_File_OpenFlag_Create); - bool bOK = (nError1 == File::E_ACCES || nError1 == File::E_ROFS); -#ifdef _WIN32 - bOK = true; /// in Windows, you can create file in c:\ any way. - testFile.close(); - deleteTestFile(aTestFile); -#endif - - CPPUNIT_ASSERT_MESSAGE( - OUStringToOString( - OUStringConcatenation( - "test for open function: create an illegal file <" + aTestFile + ">: " - + OUString::number(nError1)), - RTL_TEXTENCODING_UTF8).getStr(), - bOK); - } - void open_005() { File testFile(aTmpName4); @@ -2283,7 +2260,6 @@ namespace osl_File CPPUNIT_TEST(open_001); CPPUNIT_TEST(open_002); CPPUNIT_TEST(open_003); - CPPUNIT_TEST(open_004); CPPUNIT_TEST(open_005); CPPUNIT_TEST(open_006); CPPUNIT_TEST_SUITE_END();