diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-08 10:17:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-08 10:17:09 -0400 |
commit | cc1e5892a25949b996d69a0b07f151a276ef2570 (patch) | |
tree | 643d37db692c19d1ef64223eadcac7a28dbbd7db /t/parse.lisp | |
parent | 19d13c8339ee990fba358417a54aa6f1c94c7bca (diff) | |
parent | b85c10ba1c53f1b442fea6bde4c2a2f73cfe5d6b (diff) |
Merge pull request #1 from bdunahu/bdunahu
Add logic to open file, full lexer and tests.
Diffstat (limited to 't/parse.lisp')
-rw-r--r-- | t/parse.lisp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/parse.lisp b/t/parse.lisp new file mode 100644 index 0000000..bd1310f --- /dev/null +++ b/t/parse.lisp @@ -0,0 +1,26 @@ +(in-package #:rva-tests) + +(def-suite parse-tests + :description "Test functions exported from the parser." + :in all-tests) + +(in-suite parse-tests) + +(test extract-label-is-a-label + (is (not (parse:extract-label '("LOOP" lex::colon))))) + +(test extract-label-not-a-label-one + (let ((lst '("NICE" "TRY"))) + (is (equal lst + (parse:extract-label lst))))) + +(test extract-label-not-a-label-two + (let ((lst '("LOOP" lex::colon lex::colon))) + (is (equal lst + (parse:extract-label lst))))) + +(test extract-line-invalid-type + (handler-case + (progn (parse:tokens->ast '(("foo" LEX::DOLLAR))) + (fail)) + (lex:parser-error ()))) |