summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-12-14 11:00:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-12-14 15:03:12 +0100
commitcf2c1c28d7539c99b9b899da641c50ad21e1c210 (patch)
tree35e57860dd1900ed9b26c2535161efa5790c46f6 /sal
parent18470cb6bff9f682b3b86495d80e9ad54c9b5567 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/file/osl_File.cxx24
1 files changed, 0 insertions, 24 deletions
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();