From f1906d572fe84b4c02c205767daa073751f67358 Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Thu, 1 Sep 2016 09:17:55 -0400 Subject: [PATCH] add tests for read-cdot option --- pkgs/racket-test-core/tests/racket/read.rktl | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/racket-test-core/tests/racket/read.rktl b/pkgs/racket-test-core/tests/racket/read.rktl index 67f79a2b08..603304ef6a 100644 --- a/pkgs/racket-test-core/tests/racket/read.rktl +++ b/pkgs/racket-test-core/tests/racket/read.rktl @@ -1241,6 +1241,27 @@ (test 9t0 readstr "#o11.0t0") (test 17t0 readstr "#x11.0t0")) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; read-cdot + +(parameterize ([read-cdot #true]) + (test '(#%dot a b) readstr "a.b") + (test '(#%dot (#%dot a b) c) readstr "a.b.c") + (test '(#%dot (#%dot (#%dot a b) c) d) readstr "a.b.c.d") + (test '(#%dot a (#%dot b c)) readstr "a.(#%dot b c)") + (test '(#%dot a (m b c)) readstr "a.(m b c)") + (test '(#%dot (#%dot a (m b c)) (n d e)) readstr "a.(m b c).(n d e)") + (test '(#%dot (#%dot (#%dot (#%dot (#%dot a (m b c)) x) (n d e)) y) z) + readstr "a.(m b c).x.(n d e).y.z") + (test '(#%dot (f a) b) readstr "(f a).b") + (test '(#%dot (#%dot (f a) b) c) readstr "(f a).b.c") + (test '(#%dot (#%dot (#%dot (f a) b) c) d) readstr "(f a).b.c.d") + (test '(#%dot (f a) (#%dot b c)) readstr "(f a).(#%dot b c)") + (test '(#%dot (f a) (m b c)) readstr "(f a).(m b c)") + (test '(#%dot (#%dot (f a) (m b c)) (n d e)) readstr "(f a).(m b c).(n d e)") + (test '(#%dot (#%dot (#%dot (#%dot (#%dot (f a) (m b c)) x) (n d e)) y) z) + readstr "(f a).(m b c).x.(n d e).y.z")) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; srcloc->string