urlmon: Add tests for implicit file uri's with percent encodings.

Vincent Povirk madewokherd at gmail.com
Thu Jul 3 14:17:14 CDT 2014


-------------- next part --------------
From db7c546a09ed6ae4c49117b1f70a86459e353aa7 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 3 Jul 2014 11:45:54 -0500
Subject: [PATCH] urlmon: Add tests for implicit file uri's with percent
 encodings.

---
 dlls/urlmon/tests/uri.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c
index 737d1bb..d448566 100644
--- a/dlls/urlmon/tests/uri.c
+++ b/dlls/urlmon/tests/uri.c
@@ -4571,7 +4571,107 @@ static const uri_properties uri_tests[] = {
             {URL_SCHEME_MAILTO,S_OK},
             {URLZONE_INVALID,E_NOTIMPL}
         }
-     }
+    },
+    {   "c:\\test file.html", Uri_CREATE_FILE_USE_DOS_PATH|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE,
+        {
+            {"file://c:\\test file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"file://c:\\test file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {".html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test file.html",S_OK,FALSE},
+            {"c:\\test file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test file.html",S_OK,FALSE},
+            {"file",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE}
+        },
+        {
+            {Uri_HOST_UNKNOWN,S_OK,FALSE},
+            {0,S_FALSE,FALSE},
+            {URL_SCHEME_FILE,S_OK,FALSE},
+            {URLZONE_INVALID,E_NOTIMPL,FALSE}
+        }
+    },
+    {   "c:\\test%20file.html", Uri_CREATE_FILE_USE_DOS_PATH|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE,
+        {
+            {"file://c:\\test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"file://c:\\test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {".html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test%20file.html",S_OK,FALSE},
+            {"c:\\test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test%20file.html",S_OK,FALSE},
+            {"file",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE}
+        },
+        {
+            {Uri_HOST_UNKNOWN,S_OK,FALSE},
+            {0,S_FALSE,FALSE},
+            {URL_SCHEME_FILE,S_OK,FALSE},
+            {URLZONE_INVALID,E_NOTIMPL,FALSE}
+        }
+    },
+    {   "c:\\test file.html", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE,
+        {
+            {"file:///c:/test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"file:///c:/test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {".html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"/c:/test%20file.html",S_OK,FALSE},
+            {"/c:/test%20file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test file.html",S_OK,FALSE},
+            {"file",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE}
+        },
+        {
+            {Uri_HOST_UNKNOWN,S_OK,FALSE},
+            {0,S_FALSE,FALSE},
+            {URL_SCHEME_FILE,S_OK,FALSE},
+            {URLZONE_INVALID,E_NOTIMPL,FALSE}
+        }
+    },
+    {   "c:\\test%20file.html", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE,
+        {
+            {"file:///c:/test%2520file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"file:///c:/test%2520file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {".html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE},
+            {"/c:/test%2520file.html",S_OK,FALSE},
+            {"/c:/test%2520file.html",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"c:\\test%20file.html",S_OK,FALSE},
+            {"file",S_OK,FALSE},
+            {"",S_FALSE,FALSE},
+            {"",S_FALSE,FALSE}
+        },
+        {
+            {Uri_HOST_UNKNOWN,S_OK,FALSE},
+            {0,S_FALSE,FALSE},
+            {URL_SCHEME_FILE,S_OK,FALSE},
+            {URLZONE_INVALID,E_NOTIMPL,FALSE}
+        }
+    }
 };
 
 typedef struct _invalid_uri {
-- 
1.8.3.2



More information about the wine-patches mailing list