diff options
author | W. Kosior <koszko@koszko.org> | 2024-07-15 17:34:07 +0200 |
---|---|---|
committer | W. Kosior <koszko@koszko.org> | 2024-07-15 17:40:27 +0200 |
commit | c16ddd31b95bfbae290c01aac06c4992b01829fb (patch) | |
tree | 6cce4d85e4d6cf4b45bff67aa68a7657d7e6a4da /tests | |
parent | 96982196c4fae2b053f931b5988e52d7cf80fe45 (diff) | |
download | de-paul-records-c16ddd31b95bfbae290c01aac06c4992b01829fb.tar.gz de-paul-records-c16ddd31b95bfbae290c01aac06c4992b01829fb.zip |
Test syntactic sugar for initializing fields with list-values.HEADapprentice
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guile/de-paul-records-test.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/guile/de-paul-records-test.scm b/tests/guile/de-paul-records-test.scm index 7bcc60d..fff1606 100644 --- a/tests/guile/de-paul-records-test.scm +++ b/tests/guile/de-paul-records-test.scm @@ -26,6 +26,7 @@ is-scheme? #:export? yes,ofcourse (is-syntactically-scoped? #:default #f) + (authors #:default '()) #:finalize (lambda (the-lisp) (set-field the-lisp (lisp-is-syntactically-scoped?) @@ -49,7 +50,7 @@ '*lisp)) (test-group "lisp paren-3001" - (tu:test-equal '(#f "paren-3001" #f) + (tu:test-equal '(#f () "paren-3001" #f) (eval '(begin (define %paren-3001 (lisp (is-scheme? #f) @@ -57,10 +58,12 @@ (match %paren-3001 (($* lisp + authors is-syntactically-scoped? name is-scheme?) (list is-syntactically-scoped? + authors name is-scheme?)))) (test-env 'lisp))) @@ -83,6 +86,7 @@ (name #:-> ((const 'test-noop)) (string-append name ".1")) + (authors #:list "Jane Doe") (is-syntactically-scoped? #t))) (match `(a . ,%paren-3001.1) @@ -95,7 +99,11 @@ '(match (vector %paren-3001.1) (#(($* lisp is-scheme? name)) (list is-scheme? name))) - (test-env 'lisp)))) + (test-env 'lisp))) + + (tu:test-equal '("Jane Doe") + (eval '(lisp-authors %paren-3001.1) + (test-env 'lisp)))) (test-group "lisp paren-3003" (tu:test-equal '(#t #t) @@ -105,6 +113,7 @@ (let ((name "paren-3003")) (lisp #:<- (lisp) name + (authors #:list "Jane Doe" "John Smith") (is-scheme? (string-suffix? "-3003" name))))) (match %paren-3003 @@ -114,6 +123,10 @@ (tu:test-equal "paren-3003" (eval '(lisp-name %paren-3003) + (test-env 'lisp))) + + (tu:test-equal '("Jane Doe" "John Smith") + (eval '(lisp-authors %paren-3003) (test-env 'lisp)))) (test-group "lisp paren-3004" |