diff --git a/tests/compile-only/printf-long-double.c b/tests/compile-only/printf-long-double.c new file mode 100644 index 0000000..96fc26a --- /dev/null +++ b/tests/compile-only/printf-long-double.c @@ -0,0 +1,8 @@ +#include + +volatile long double x = 42.0L; + +int main(void) { + printf("the answer is %Lf\n", x); + return 0; +} diff --git a/tests/general/printf-long-double-enabled.c b/tests/general/printf-long-double-enabled.c new file mode 100644 index 0000000..96fc26a --- /dev/null +++ b/tests/general/printf-long-double-enabled.c @@ -0,0 +1,8 @@ +#include + +volatile long double x = 42.0L; + +int main(void) { + printf("the answer is %Lf\n", x); + return 0; +} diff --git a/tests/general/printf-long-double-enabled.c.options b/tests/general/printf-long-double-enabled.c.options new file mode 100644 index 0000000..2b2ec8e --- /dev/null +++ b/tests/general/printf-long-double-enabled.c.options @@ -0,0 +1 @@ +-lc-printscan-long-double diff --git a/tests/general/printf-long-double-enabled.c.stdout.expected b/tests/general/printf-long-double-enabled.c.stdout.expected new file mode 100644 index 0000000..e23e024 --- /dev/null +++ b/tests/general/printf-long-double-enabled.c.stdout.expected @@ -0,0 +1 @@ +the answer is 42.000000 diff --git a/tests/general/printf-no-float.c b/tests/general/printf-no-float.c new file mode 100644 index 0000000..7e8339d --- /dev/null +++ b/tests/general/printf-no-float.c @@ -0,0 +1,8 @@ +#include + +volatile int x = 42; + +int main(void) { + printf("the answer is %d\n", x); + return 0; +} diff --git a/tests/general/printf-no-float.c.stdout.expected b/tests/general/printf-no-float.c.stdout.expected new file mode 100644 index 0000000..5bdef3d --- /dev/null +++ b/tests/general/printf-no-float.c.stdout.expected @@ -0,0 +1 @@ +the answer is 42 diff --git a/tests/general/printf-no-long-double.c b/tests/general/printf-no-long-double.c new file mode 100644 index 0000000..2364ef0 --- /dev/null +++ b/tests/general/printf-no-long-double.c @@ -0,0 +1,8 @@ +#include + +volatile double x = 42.0; + +int main(void) { + printf("the answer is %f\n", x); + return 0; +} diff --git a/tests/general/printf-no-long-double.c.stdout.expected b/tests/general/printf-no-long-double.c.stdout.expected new file mode 100644 index 0000000..e23e024 --- /dev/null +++ b/tests/general/printf-no-long-double.c.stdout.expected @@ -0,0 +1 @@ +the answer is 42.000000