diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-24 10:07:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-24 10:07:31 +0100 |
commit | 635d4b0eb8ccdec84d78c9b1d2aa113f6250e1f2 (patch) | |
tree | 48d5531bae5d816ea0bb8983683289da593dab46 /tools | |
parent | 6ebf8368a5cdec0d0e5a44dc5191d2b7c040240f (diff) |
Clarify some INetURLObject::setExtension behavior
Change-Id: I1a9e7233b2861a3d09661a08c07d2043c9c0c3c1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_urlobj.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx index 00ca3f720621..2dfc092d5adb 100644 --- a/tools/qa/cppunit/test_urlobj.cxx +++ b/tools/qa/cppunit/test_urlobj.cxx @@ -357,6 +357,16 @@ namespace tools_urlobj !INetURLObject("vnd.sun.star.pkg://example.org").isAnyKnownWebDAVScheme()); } + void testSetExtension() { + INetURLObject obj("file:///foo/bar.baz/"); + bool ok = obj.setExtension( + "other", INetURLObject::LAST_SEGMENT, false); + CPPUNIT_ASSERT(ok); + CPPUNIT_ASSERT_EQUAL( + OUString("file:///foo/bar.baz/.other"), + obj.GetMainURL(INetURLObject::DecodeMechanism::NONE)); + } + // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism. @@ -373,6 +383,7 @@ namespace tools_urlobj CPPUNIT_TEST( urlobjTest_data ); CPPUNIT_TEST( urlobjTest_isSchemeEqualTo ); CPPUNIT_TEST( urlobjTest_isAnyKnownWebDAVScheme ); + CPPUNIT_TEST( testSetExtension ); CPPUNIT_TEST_SUITE_END( ); }; // class createPool |