add some tests for syntax->string
This commit is contained in:
parent
40c589ef8a
commit
6a7ad2e49e
|
@ -4,6 +4,22 @@
|
|||
|
||||
(check-equal? (syntax->string #'((a .
|
||||
b))) "(a . \n b)")
|
||||
(check-equal? (syntax->string #'((a b c d))) "(a b c d)")
|
||||
(check-equal? (syntax->string #'(( a b c d))) "( a b c d)")
|
||||
(check-equal? (syntax->string #'(a 'b #(a b c) c)) "a 'b #(a b c) c")
|
||||
(check-equal? (syntax->string #'((a b _ d))) "(a b _ d)")
|
||||
|
||||
(check-equal? (syntax->string #'(( a b ))) "( a b )")
|
||||
; we can't find where . is, default to earliest position
|
||||
(check-equal? (syntax->string #'(( a b . c ))) "( a b . c )")
|
||||
|
||||
;; quote tests
|
||||
(check-equal? (syntax->string #'('a)) "'a")
|
||||
(check-equal? (syntax->string #'(' a)) "' a")
|
||||
(check-equal? (syntax->string #'((quote a))) "(quote a)")
|
||||
(check-equal? (syntax->string #'(( quote a ))) "( quote a )")
|
||||
(check-equal? (syntax->string #'((quote a b))) "(quote a b)")
|
||||
(check-equal? (syntax->string #'(( quote a b ))) "( quote a b )")
|
||||
(check-equal? (syntax->string #'((quote . a))) "(quote . a)")
|
||||
(check-equal? (syntax->string #'(( quote . a ))) "( quote . a )")
|
||||
(check-equal? (syntax->string #'((quote a b . c))) "(quote a b . c)")
|
||||
(check-equal? (syntax->string #'(( quote a b . c ))) "( quote a b . c )")
|
||||
|
|
Loading…
Reference in New Issue
Block a user