From: Martin Baute Date: Thu, 7 Apr 2016 06:00:07 +0000 (+0200) Subject: Activated Tyndur tests for _PDCLIB_print(). Fixed flag handling bug. X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=15cd62244797b9aeb3279484f8e760778c52bc4e Activated Tyndur tests for _PDCLIB_print(). Fixed flag handling bug. --- diff --git a/functions/_PDCLIB/print.c b/functions/_PDCLIB/print.c index f3df0ec..9a30ca2 100644 --- a/functions/_PDCLIB/print.c +++ b/functions/_PDCLIB/print.c @@ -291,7 +291,7 @@ const char * _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status spec = endptr; } /* Having a precision cancels out any zero flag. */ - status->flags ^= E_zero; + status->flags &= ~E_zero; } /* Optional length modifier diff --git a/testing/printf_testcases.h b/testing/printf_testcases.h index d46e987..e0357fc 100644 --- a/testing/printf_testcases.h +++ b/testing/printf_testcases.h @@ -131,7 +131,6 @@ PRINTF_TEST( 1, "1", "%ju", (uintmax_t) 1); // uintmax_t PRINTF_TEST( 1, "1", "%zd", (size_t) 1); // signed size_t -#ifndef TEST_CONVERSION_ONLY /****************************************************************************** * NOTE: The following test cases are imported from the Tyndur project. They * * are therefore under the license of said project, not CC0. * @@ -168,8 +167,10 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ { +#ifndef TEST_CONVERSION_ONLY /* Ein String ohne alles */ PRINTF_TEST(12, "Hallo heimur", "Hallo heimur"); +#endif /* Einfache Konvertierungen */ PRINTF_TEST(12, "Hallo heimur", "%s", "Hallo heimur"); PRINTF_TEST(4, "1024", "%d", 1024); @@ -431,5 +432,3 @@ PRINTF_TEST(20, "00EDCB5433 ", "% -+0*.*X", 20, 10, -0x1234abcdu); } /******************************************************************************/ -#endif -