mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
msvcrt/tests: Add scanf tests for dashes in scanset.
Signed-off-by: Will Mainio <will.mainio@fastmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c38102b9b4
commit
e0812be876
1 changed files with 16 additions and 0 deletions
|
@ -186,6 +186,22 @@ static void test_sscanf( void )
|
|||
ok( ret == 1, "Error with format \"%s\"\n","%*[a-cd-dg-e]%c");
|
||||
ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]);
|
||||
|
||||
ret = p_sscanf("-123", "%[-0-9]", buffer);
|
||||
ok( ret == 1, "Error with format \"%s\"\n", "%[-0-9]");
|
||||
ok( strcmp("-123", buffer) == 0, "Error with \"-123\" \"%s\"\n", buffer);
|
||||
|
||||
ret = p_sscanf("-321", "%[0-9-]", buffer);
|
||||
ok( ret == 1, "Error with format \"%s\"\n", "%[0-9-]");
|
||||
ok( strcmp("-321", buffer) == 0, "Error with \"-321\" \"%s\"\n", buffer);
|
||||
|
||||
ret = p_sscanf("-4123", "%[1-2-4]", buffer);
|
||||
ok( ret == 1, "Error with format \"%s\"\n", "%[1-2-4]");
|
||||
ok( strcmp("-412", buffer) == 0, "Error with \"-412\" \"%s\"\n", buffer);
|
||||
|
||||
ret = p_sscanf("-456123", "%[1-2-45-6]", buffer);
|
||||
ok( ret == 1, "Error with format \"%s\"\n", "%[1-2-45-6]");
|
||||
ok( strcmp("-45612", buffer) == 0, "Error with \"-45612\" \"%s\"\n", buffer);
|
||||
|
||||
buffer1[0] = 'b';
|
||||
ret = p_sscanf("a","%s%s", buffer, buffer1);
|
||||
ok( ret == 1, "expected 1, got %u\n", ret);
|
||||
|
|
Loading…
Reference in a new issue