TESTCASE( fwrite( "abcdefgh-ijklmnop[qrs%uvw]xyz", 1, 29, alpha ) == 29 );
rewind( alpha );
TESTCASE( fwrite( "abcdefgh-ijklmnop[qrs%uvw]xyz", 1, 29, alpha ) == 29 );
rewind( alpha );
FILE * special = fopen( "scanf_testdata_special", "wb+" );
TESTCASE( special != NULL );
TESTCASE( fwrite( "-0xz\n", 1, 5, special ) == 5 );
rewind( special );
FILE * special = fopen( "scanf_testdata_special", "wb+" );
TESTCASE( special != NULL );
TESTCASE( fwrite( "-0xz\n", 1, 5, special ) == 5 );
rewind( special );
CHECK_FALSE( memcmp( buffer, "abc", 4 ) );
}
CHECK_FALSE( memcmp( buffer, "abc", 4 ) );
}
- {
- // reading -0x, x
- unsigned char i = 1;
/* Most existing libraries disagree with this test case, so a little
explanation of why PDCLib chose the implementation it did might be
necessary. All references are from ISO/IEC 9899:1999 "Programming
/* Most existing libraries disagree with this test case, so a little
explanation of why PDCLib chose the implementation it did might be
necessary. All references are from ISO/IEC 9899:1999 "Programming
- The conversion should therefore result in a matching failure
according to 7.19.6.2 paragraph 10.
*/
- The conversion should therefore result in a matching failure
according to 7.19.6.2 paragraph 10.
*/
-#ifdef REGTEST
- printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n"
- " for an explanation why.\n" );
-#endif
- TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hhx", &i ) ); /* May fail on regtest */
+ {
+ // reading -0x, x
+ unsigned char i = 1;
+ TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hhx", &i ) );
CHECK_EQUAL( i, 1 ); /* FIXME */
}
{
// reading -0x, x
unsigned short i = 1;
CHECK_EQUAL( i, 1 ); /* FIXME */
}
{
// reading -0x, x
unsigned short i = 1;
-#ifdef REGTEST
- printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n"
- " for an explanation why.\n" );
-#endif
- TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hx", &i ) ); /* May fail on regtest */
+ TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hx", &i ) );
CHECK_EQUAL( i, 1 ); /* FIXME */
}
{
// reading -0x, x
unsigned int i = 1;
CHECK_EQUAL( i, 1 ); /* FIXME */
}
{
// reading -0x, x
unsigned int i = 1;
-#ifdef REGTEST
- printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n"
- " for an explanation why.\n" );
-#endif
- TESTSCAN( 0, -1, special, 0, SCANPARMS( "%x", &i ) ); /* May fail on regtest */
+ TESTSCAN( 0, -1, special, 0, SCANPARMS( "%x", &i ) );
CHECK_EQUAL( i, 1 ); /* FIXME */
}
CHECK_EQUAL( i, 1 ); /* FIXME */
}
"+01777777777777777777777\n"
"-01777777777777777777777\n";
char const * alpha = "abcdefgh-ijklmnop[qrs%uvw]xyz";
"+01777777777777777777777\n"
"-01777777777777777777777\n";
char const * alpha = "abcdefgh-ijklmnop[qrs%uvw]xyz";
char const * special = "-0xz\n";
char const * special = "-0xz\n";