Francois Gouget : oleau32/tests: Show that spaces are not allowed before exponents.

Alexandre Julliard julliard at winehq.org
Wed Apr 27 16:12:13 CDT 2022


Module: wine
Branch: master
Commit: cf33a13d35cd3ed1f500db6d8e898b45920ab19d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cf33a13d35cd3ed1f500db6d8e898b45920ab19d

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Apr 27 15:21:13 2022 +0200

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

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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();
   }
 




More information about the wine-cvs mailing list