Code

Native path support
authorishmal <ishmal@users.sourceforge.net>
Sat, 22 Apr 2006 22:46:00 +0000 (22:46 +0000)
committerishmal <ishmal@users.sourceforge.net>
Sat, 22 Apr 2006 22:46:00 +0000 (22:46 +0000)
src/dom/work/testuri.cpp

index 2754af76a8f252d005bb65561733dcac692be90c..3abb6a574a11d61d27308ed50c1a0eb362bb615b 100644 (file)
@@ -71,7 +71,20 @@ static bool test2()
     return true;
 }
 
-
+static bool test3()
+{
+    printf("############ windows-style uri.resolve() #######\n");
+    URI absUri("file:C:\\this\\is\\an\\.\\absolute/path.sfx");
+    printf("absUri:%s\n", absUri.getPath().c_str());
+    printf("absUri:%s\n", absUri.getNativePath().c_str());
+    URI relUri("..\\this\\is\\a\\.\\relative\\path.sfx");
+    printf("relUri:%s\n", relUri.getPath().c_str());
+    printf("relUri:%s\n", relUri.getNativePath().c_str());
+    URI resUri = absUri.resolve(relUri);
+    printf("resUri:%s\n", resUri.getPath().c_str());
+    printf("resUri:%s\n", resUri.getNativePath().c_str());
+    return true;
+}
 
 int main(int argc, char **argv)
 {
@@ -79,5 +92,7 @@ int main(int argc, char **argv)
         return 1;
     if (!test2())
         return 1;
+    if (!test3())
+        return 1;
     return 0;
 }