[PATCH] oleau32/tests: Show that spaces are not allowed before exponents.

Francois Gouget fgouget at codeweavers.com
Wed Apr 27 08:21:13 CDT 2022


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 dlls/oleaut32/tests/vartest.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 9456b56eb26..4fc0e4e0221 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -1837,6 +1837,11 @@ static void test_VarParseNumFromStrEn(void)
   EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,1);
   EXPECT2(1,FAILDIG);
 
+  /* Spaces are not allowed before the exponent */
+  CONVERT("1 e1", NUMPRS_EXPONENT|NUMPRS_TRAILING_WHITE);
+  EXPECT(1,NUMPRS_EXPONENT|NUMPRS_TRAILING_WHITE,NUMPRS_TRAILING_WHITE,2,0,0);
+  EXPECT2(1,FAILDIG);
+
   /* With flag, incompatible with NUMPRS_HEX_OCT */
   CONVERT("&o1e1", NUMPRS_HEX_OCT|NUMPRS_EXPONENT);
   EXPECT(1,NUMPRS_HEX_OCT|NUMPRS_EXPONENT,NUMPRS_HEX_OCT,3,3,0);
@@ -2013,6 +2018,11 @@ static void test_VarParseNumFromStrFr(void)
       EXPECTFAIL;
     }
 
+    /* No space of any type is allowed before the exponent... */
+    wsprintfW(wstr, L"1%ce1", spaces[i]);
+    WCONVERT(wstr, NUMPRS_EXPONENT|NUMPRS_TRAILING_WHITE|NUMPRS_USE_ALL);
+    EXPECTFAIL;
+
     winetest_pop_context();
   }
 
-- 
2.30.2




More information about the wine-devel mailing list