From 32b21b7d85383df49030b18240c1409e73001066 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 1 Oct 2023 22:06:17 +0200 Subject: Add vfprintf` --- tests/Makefile | 1 + tests/test_fprintf.c | 7 +++++++ tests/test_vfprintf.c | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 tests/test_fprintf.c create mode 100644 tests/test_vfprintf.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 445ac9c..5f70069 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -114,6 +114,7 @@ RUNTIME_TARGETS= \ test_vsnprintf_dynamic \ test_vsnprintf_static \ test_vsprintf \ + test_vfprintf \ test_vprintf \ test_wcscat_static_write \ test_wcscpy_static_write \ diff --git a/tests/test_fprintf.c b/tests/test_fprintf.c new file mode 100644 index 0000000..ab83f11 --- /dev/null +++ b/tests/test_fprintf.c @@ -0,0 +1,7 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + fprintf(stdout, "%s", "1234567"); +} diff --git a/tests/test_vfprintf.c b/tests/test_vfprintf.c new file mode 100644 index 0000000..8ccf994 --- /dev/null +++ b/tests/test_vfprintf.c @@ -0,0 +1,16 @@ +#include "common.h" + +#include +#include + +void wrap(char *format, ...) { + va_list args; + va_start(args, format); + vfprintf(stdout, format, args); + va_end(args); +} + + +int main(int argc, char** argv) { + wrap("%s", "1234567"); +} -- cgit v1.3