From a39447e6a479af7770aaf0d6cad51285868214b2 Mon Sep 17 00:00:00 2001 From: oddcoder <ahmedsoliman@oddcoder.com> Date: Fri, 8 May 2020 22:37:39 +0200 Subject: [PATCH] Test printf space padding regression --- tests/Makefile | 1 + tests/expected/stdio/printf_space_pad.stderr | 0 tests/expected/stdio/printf_space_pad.stdout | 1 + tests/stdio/printf_space_pad.c | 4 ++++ 4 files changed, 6 insertions(+) create mode 100644 tests/expected/stdio/printf_space_pad.stderr create mode 100644 tests/expected/stdio/printf_space_pad.stdout create mode 100644 tests/stdio/printf_space_pad.c diff --git a/tests/Makefile b/tests/Makefile index eec484b0..a6f967a8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -41,6 +41,7 @@ EXPECT_NAMES=\ stdio/scanf \ stdio/setvbuf \ stdio/sprintf \ + stdio/printf_space_pad \ stdlib/a64l \ stdlib/alloc \ stdlib/atof \ diff --git a/tests/expected/stdio/printf_space_pad.stderr b/tests/expected/stdio/printf_space_pad.stderr new file mode 100644 index 00000000..e69de29b diff --git a/tests/expected/stdio/printf_space_pad.stdout b/tests/expected/stdio/printf_space_pad.stdout new file mode 100644 index 00000000..8e9107f3 --- /dev/null +++ b/tests/expected/stdio/printf_space_pad.stdout @@ -0,0 +1 @@ +A B diff --git a/tests/stdio/printf_space_pad.c b/tests/stdio/printf_space_pad.c new file mode 100644 index 00000000..9e917282 --- /dev/null +++ b/tests/stdio/printf_space_pad.c @@ -0,0 +1,4 @@ +#include <stdio.h> +int main() { + printf ("%s%*s\n","A", 3, "B"); +} -- GitLab