[PATCH v2] urlmon/tests: Check that .Net is present in the user-agent string.

Francois Gouget fgouget at codeweaver.com
Thu May 6 09:09:54 CDT 2021


This also fixes a failure in the 64-bit urlmon:misc.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
I figured that if .Net is mandatory we should check for it explicitly, 
which shows more clearly that it is missing for all versions.
If we wanted the tests to pass without Wine-Mono that would be wrong but 
I don't think we want to run the tests in such a configuration.

 dlls/urlmon/tests/misc.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c
index 2b3df65d5fc..00de143a53c 100644
--- a/dlls/urlmon/tests/misc.c
+++ b/dlls/urlmon/tests/misc.c
@@ -1544,6 +1544,7 @@ static void test_user_agent(void)
         }else if(sizeof(void*) == 8) {
             p += check_prefix(p, "Win64; ");
 #ifdef __x86_64__
+            todo_wine
             p += check_prefix(p, "x64; ");
 #endif
         }
@@ -1556,15 +1557,19 @@ static void test_user_agent(void)
             }
             p++; /* skip version number */
             p += check_prefix(p, ".0");
+            if (*p == ';')
+                p += check_prefix(p, "; ");
         }
         if(i == 11) {
-            p += check_prefix(p, "; rv:11.0) like Gecko");
+            p += check_prefix(p, "rv:11.0) like Gecko");
+        }else if (i >= 9) {
+            p += check_prefix(p, ")");
         }else {
-            if(i != 1)
-                ok(*p == ';' || *p == ')', "unexpected suffix %s for version %u\n",
-                   wine_dbgstr_a(p), i);
-            if(i < 9)
-                p = strchr(p, ')');
+#ifdef __x86_64__
+            todo_wine
+#endif
+            p += check_prefix(p, ".NET");
+            p = strchr(p, ')');
             p += check_prefix(p, ")");
         }
 
-- 
2.20.1



More information about the wine-devel mailing list