dlls/msvcrt/tests/printf.c: %% in printf format string

wine.larry.engholm at xoxy.net wine.larry.engholm at xoxy.net
Tue May 10 11:26:56 CDT 2005


With Uwe's encouragement, this tests for the bug fixed in yesterday's
wine/dlls/msvcrt wcs.c patch.

-Larry

Changelog
 Add test for correctly interpreting %% printf format string
conversion specifier.

Index: printf.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/tests/printf.c,v
retrieving revision 1.6
diff -u -p -r1.6 printf.c
--- printf.c    5 Mar 2005 10:46:46 -0000       1.6
+++ printf.c    10 May 2005 16:12:32 -0000
@@ -269,6 +269,11 @@ static void test_sprintf( void )
     r = sprintf(buffer, format, 0x100+'X');
     ok(!strcmp(buffer,"xXx"), "failed\n");
     ok( r==3, "return count wrong\n");
+
+    format = "%%0";
+    r = sprintf(buffer, format);
+    ok(!strcmp(buffer,"%0"), "failed: \"%s\"\n", buffer);
+    ok( r==2, "return count wrong\n");
 }

 static void test_swprintf( void )




More information about the wine-patches mailing list