X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ftests%2Fbug1057979.c;h=68882498fd037a604ed1fdfaec5fdc74b4001ab6;hb=4feac4f3a6ef7546d9e8f67441d36fdf940bb03f;hp=2493f2773dcd17c67aa60381988459f1abb569e0;hpb=8ea7f033d9b9bb44517b3b637976b1b31294fb16;p=fw%2Fsdcc diff --git a/support/regression/tests/bug1057979.c b/support/regression/tests/bug1057979.c index 2493f277..68882498 100644 --- a/support/regression/tests/bug1057979.c +++ b/support/regression/tests/bug1057979.c @@ -38,5 +38,20 @@ test_sprintf(void) sprintf( s, "%-3.3s", "ab" ); ASSERT( 0 == strcmp( s, "ab " ) ); +#if defined(SDCC__ds390) || defined(PORT_HOST) + //and from bug 1358192 + sprintf( s, "%f", 10.1 ); + LOG((s)); + ASSERT( 0 == strcmp( s, "10.100000" ) ); + + //and from bug 1388703 + sprintf( s, "%4.1f", 1.36 ); + LOG((s)); + ASSERT( 0 == strcmp( s, " 1.4" ) ); + sprintf( s, "%4.1f", -1.37 ); + LOG((s)); + ASSERT( 0 == strcmp( s, "-1.4" ) ); +#endif + ASSERT( s[12]==0x12 ); }