summaryrefslogtreecommitdiff
path: root/tests/float
diff options
context:
space:
mode:
Diffstat (limited to 'tests/float')
-rw-r--r--tests/float/string_format.py4
-rw-r--r--tests/float/string_format_modulo.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/float/string_format.py b/tests/float/string_format.py
index b5ff68b8c..265efedec 100644
--- a/tests/float/string_format.py
+++ b/tests/float/string_format.py
@@ -23,6 +23,10 @@ test("{:10.4F}", -123.456)
test("{:10.4G}", 123.456)
test("{:10.4G}", -123.456)
+test("{:06e}", float("inf"))
+test("{:06e}", float("-inf"))
+test("{:06e}", float("nan"))
+
# The following fails right now
#test("{:10.1}", 0.0)
diff --git a/tests/float/string_format_modulo.py b/tests/float/string_format_modulo.py
index ddca0b555..11df9abbd 100644
--- a/tests/float/string_format_modulo.py
+++ b/tests/float/string_format_modulo.py
@@ -17,3 +17,7 @@ print("%f" % 1.23456)
print("%F" % 1.23456)
print("%g" % 1.23456)
print("%G" % 1.23456)
+
+print("%06e" % float("inf"))
+print("%06e" % float("-inf"))
+print("%06e" % float("nan"))