MCPcopy Create free account
hub / github.com/Kitware/CMake / testToWindowsExtendedPath

Function testToWindowsExtendedPath

Source/kwsys/testEncoding.cxx:187–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187static int testToWindowsExtendedPath()
188{
189#ifdef _WIN32
190 int ret = 0;
191 if (kwsys::Encoding::ToWindowsExtendedPath(
192 "L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") !=
193 L"\\\\?\\L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") {
194 std::cout << "Problem with ToWindowsExtendedPath "
195 << "\"L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\""
196 << std::endl;
197 ++ret;
198 }
199
200 if (kwsys::Encoding::ToWindowsExtendedPath(
201 "L:/Local Mojo/Hex Power Pack/Iffy Voodoo") !=
202 L"\\\\?\\L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") {
203 std::cout << "Problem with ToWindowsExtendedPath "
204 << "\"L:/Local Mojo/Hex Power Pack/Iffy Voodoo\"" << std::endl;
205 ++ret;
206 }
207
208 if (kwsys::Encoding::ToWindowsExtendedPath(
209 "\\\\Foo\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") !=
210 L"\\\\?\\UNC\\Foo\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") {
211 std::cout << "Problem with ToWindowsExtendedPath "
212 << "\"\\\\Foo\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\""
213 << std::endl;
214 ++ret;
215 }
216
217 if (kwsys::Encoding::ToWindowsExtendedPath(
218 "//Foo/Local Mojo/Hex Power Pack/Iffy Voodoo") !=
219 L"\\\\?\\UNC\\Foo\\Local Mojo\\Hex Power Pack\\Iffy Voodoo") {
220 std::cout << "Problem with ToWindowsExtendedPath "
221 << "\"//Foo/Local Mojo/Hex Power Pack/Iffy Voodoo\""
222 << std::endl;
223 ++ret;
224 }
225
226 if (kwsys::Encoding::ToWindowsExtendedPath("//") != L"//") {
227 std::cout << "Problem with ToWindowsExtendedPath "
228 << "\"//\"" << std::endl;
229 ++ret;
230 }
231
232 if (kwsys::Encoding::ToWindowsExtendedPath("\\\\.\\") != L"\\\\.\\") {
233 std::cout << "Problem with ToWindowsExtendedPath "
234 << "\"\\\\.\\\"" << std::endl;
235 ++ret;
236 }
237
238 if (kwsys::Encoding::ToWindowsExtendedPath("\\\\.\\X") != L"\\\\.\\X") {
239 std::cout << "Problem with ToWindowsExtendedPath "
240 << "\"\\\\.\\X\"" << std::endl;
241 ++ret;
242 }
243
244 if (kwsys::Encoding::ToWindowsExtendedPath("\\\\.\\X:") != L"\\\\?\\X:") {

Callers 1

testEncodingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…