aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/printf/output.txt10
-rw-r--r--tests/printf/test.c10
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/printf/output.txt b/tests/printf/output.txt
index dc3a875e..99e91e7f 100644
--- a/tests/printf/output.txt
+++ b/tests/printf/output.txt
@@ -13,6 +13,16 @@ INF
-INF
nan
NAN
+0
+0
+0.0
+0.00
+0.00000
+1
+1
+1.0
+1.00
+1.00000
1
12
123
diff --git a/tests/printf/test.c b/tests/printf/test.c
index c862ae44..ac662dca 100644
--- a/tests/printf/test.c
+++ b/tests/printf/test.c
@@ -17,6 +17,16 @@ int main() {
printf("%lF\n", -INFINITY);
printf("%lf\n", NAN);
printf("%lF\n", NAN);
+ printf("%.f\n", 0.0f);
+ printf("%.0f\n", 0.0f);
+ printf("%.1f\n", 0.0f);
+ printf("%.2f\n", 0.0f);
+ printf("%.5f\n", 0.0f);
+ printf("%.f\n", 1.0f);
+ printf("%.0f\n", 1.0f);
+ printf("%.1f\n", 1.0f);
+ printf("%.2f\n", 1.0f);
+ printf("%.5f\n", 1.0f);
printf("%g\n", 1.f);
printf("%g\n", 12.f);
printf("%g\n", 123.f);