From 0c25d63a4bbdb5066eb67d56ada67bc5f80c1bac Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Sat, 22 Apr 2006 22:46:00 +0000 Subject: Native path support (bzr r572) --- src/dom/work/testuri.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dom/work/testuri.cpp b/src/dom/work/testuri.cpp index 2754af76a..3abb6a574 100644 --- a/src/dom/work/testuri.cpp +++ b/src/dom/work/testuri.cpp @@ -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; } -- cgit v1.2.3