update lexer test

pull/10/head
Matthew Butterick 8 years ago
parent a48b7824f1
commit 422b3d105d

@ -17,19 +17,27 @@
(srcloc 'string #f #f 12 1)))) (srcloc 'string #f #f 12 1))))
(check-equal? (check-equal?
(lex "print") (lex "print")
(list (srcloc-token "print" (list (srcloc-token (token "print" "print")
(srcloc 'string #f #f 1 5)))) (srcloc 'string #f #f 1 5))))
(check-equal? (check-equal?
(lex "goto") (lex "goto")
(list (srcloc-token "goto" (list (srcloc-token (token "goto" "goto")
(srcloc 'string #f #f 1 4)))) (srcloc 'string #f #f 1 4))))
(check-equal? (check-equal?
(lex "end") (lex "end")
(list (srcloc-token "end" (list (srcloc-token (token "end" "end")
(srcloc 'string #f #f 1 3)))) (srcloc 'string #f #f 1 3))))
(check-equal? (check-equal?
(lex "+") (lex "+")
(list (srcloc-token "+" (list (srcloc-token (token "+" "+")
(srcloc 'string #f #f 1 1))))
(check-equal?
(lex ";")
(list (srcloc-token (token ";" ";")
(srcloc 'string #f #f 1 1))))
(check-equal?
(lex ":")
(list (srcloc-token (token ":" ":")
(srcloc 'string #f #f 1 1)))) (srcloc 'string #f #f 1 1))))
(check-equal? (check-equal?
(lex "12") (lex "12")

Loading…
Cancel
Save