Francois Gouget : oleau32/tests: Show that spaces are not allowed before exponents.
Module: wine Branch: master Commit: cf33a13d35cd3ed1f500db6d8e898b45920ab19d URL: https://source.winehq.org/git/wine.git/?a=commit;h=cf33a13d35cd3ed1f500db6d8... Author: Francois Gouget <fgouget(a)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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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(); }
participants (1)
-
Alexandre Julliard