diff --git a/tests/Makefile b/tests/Makefile index c6958733d2..7ff599552b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -45,6 +45,7 @@ EXPECT_NAMES=\ stdio/ungetc_multiple \ stdio/ungetc_ftell \ stdio/fscanf_offby1 \ + stdio/printf_neg_pad \ stdlib/a64l \ stdlib/alloc \ stdlib/atof \ diff --git a/tests/expected/stdio/printf_neg_pad.stderr b/tests/expected/stdio/printf_neg_pad.stderr new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/expected/stdio/printf_neg_pad.stdout b/tests/expected/stdio/printf_neg_pad.stdout new file mode 100644 index 0000000000..f573a2b6d2 --- /dev/null +++ b/tests/expected/stdio/printf_neg_pad.stdout @@ -0,0 +1,2 @@ +A BCC/ +AB CC/ diff --git a/tests/stdio/printf_neg_pad.c b/tests/stdio/printf_neg_pad.c new file mode 100644 index 0000000000..7f443034b9 --- /dev/null +++ b/tests/stdio/printf_neg_pad.c @@ -0,0 +1,5 @@ +#include +int main() { + printf ("A%*s%s/\n", 5, "B", "CC"); + printf ("A%*s%s/\n", -5, "B", "CC"); +}