diff options
author | Stephan Bergmann <sb@openoffice.org> | 2001-11-23 14:00:21 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2001-11-23 14:00:21 +0000 |
commit | 63325a605b904eca133b93f9fb944f7c50a70725 (patch) | |
tree | 4bb57268c24e1b7245b7ff1840aa483140ef6086 /tools/workben | |
parent | d856fac1d91e805ce2ff35ec856c3bec1a7b3029 (diff) |
#94773# Handle DOS UNC paths in getFSysPath().
Diffstat (limited to 'tools/workben')
-rw-r--r-- | tools/workben/urltest.cxx | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx index 40a6585e9e9a..1ec51303051f 100644 --- a/tools/workben/urltest.cxx +++ b/tools/workben/urltest.cxx @@ -2,9 +2,9 @@ * * $RCSfile: urltest.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: sb $ $Date: 2001-08-21 14:51:28 $ + * last change: $Author: sb $ $Date: 2001-11-23 15:00:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1011,5 +1011,43 @@ main() } } + if (true) + { + INetURLObject aUrl(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "file://host/dir/file"))); + rtl::OUString aPath; + aPath = aUrl.getFSysPath(INetURLObject::FSYS_DETECT); + if (!aPath. + equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("//host/dir/file"))) + { + printf("BAD getFSysPath(VOS|UNX|DOS|MAC) = %s\n", + rtl::OUStringToOString(aPath, RTL_TEXTENCODING_UTF8). + getStr()); + bSuccess = false; + } + aPath = aUrl.getFSysPath(INetURLObject::FSysStyle( + INetURLObject::FSYS_UNX + | INetURLObject::FSYS_DOS + | INetURLObject::FSYS_MAC)); + if (!aPath.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( + "\\\\host\\dir\\file"))) + { + printf("BAD getFSysPath(UNX|DOS|MAC) = %s\n", + rtl::OUStringToOString(aPath, RTL_TEXTENCODING_UTF8). + getStr()); + bSuccess = false; + } + aPath = aUrl.getFSysPath(INetURLObject::FSysStyle( + INetURLObject::FSYS_UNX + | INetURLObject::FSYS_MAC)); + if (aPath.getLength() != 0) + { + printf("BAD getFSysPath(UNX|MAC) = %s\n", + rtl::OUStringToOString(aPath, RTL_TEXTENCODING_UTF8). + getStr()); + bSuccess = false; + } + } + return bSuccess ? EXIT_SUCCESS : EXIT_FAILURE; } |