Add test for negative pad stupport in printf

This commit is contained in:
oddcoder
2020-05-23 15:29:16 +02:00
parent ee5e2bad5a
commit 7eba6d88df
4 changed files with 8 additions and 0 deletions
+1
View File
@@ -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 \
@@ -0,0 +1,2 @@
A BCC/
AB CC/
+5
View File
@@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf ("A%*s%s/\n", 5, "B", "CC");
printf ("A%*s%s/\n", -5, "B", "CC");
}