From 539df6bfa8033ef04d00a5b661c4666a5749f4d9 Mon Sep 17 00:00:00 2001 From: ishmal Date: Sat, 22 Apr 2006 22:46:00 +0000 Subject: [PATCH] Native path support --- src/dom/work/testuri.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; } -- 2.30.2