There is no exact infinity or NaN, so #e should reject them.
authorTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 03:54:00 +0000 (03:54 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 17:17:05 +0000 (17:17 +0000)
But we produce them anyway.

tests/runtime/test-readwrite.scm

index 691a069b2778e460ac809da7b0fec601d45e177d..17a41687d1f94a843decc64615890437a8391c99 100644 (file)
@@ -178,4 +178,14 @@ USA.
   (lambda (string assertion #!optional xfail)
     (with-expected-failure xfail
       (lambda ()
-       (assertion (read-from-string string))))))
\ No newline at end of file
+       (assertion (read-from-string string))))))
+
+(define-enumerated-test 'read-error
+  `(("#e+nan.0" ,expect-failure)
+    ("#e-nan.0" ,expect-failure)
+    ("#e+inf.0" ,expect-failure)
+    ("#e-inf.0" ,expect-failure))
+  (lambda (string #!optional xfail)
+    (with-expected-failure xfail
+      (lambda ()
+        (assert-error (lambda () (read-from-string string)))))))
\ No newline at end of file