about summary refs log tree commit diff stats
path: root/tests/run.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/run.scm b/tests/run.scm new file mode 100644 index 0000000..aa5dab1 --- /dev/null +++ b/tests/run.scm
@@ -0,0 +1,61 @@
1(import scheme
2 (chicken base)
3 (chicken load)
4 (chicken port)
5 (chicken process-context)
6 test)
7
8;;; Setup
9
10(import (jimmy emit)
11 (jimmy read)
12 #;(jimmy wrap))
13
14(define test-doc #<<end-document
15: title a test document
16: date 2024-05-13T03:02:45Z
17: uuid b3daebf1-440b-4828-a4d9-9089c7bd7c61
18
19# a test document of some kind
20
21here is a test document.
22it has paragraphs
23=> example.com with links!
24and other things.
25
26## a code example
27```
28for (a=1;a<=4;a++) {
29 printf("%d\n", a);
30}
31```
32
33### other examples
34
35> a blockquote is a quote
36> that is blocky.
37
38* list 1
39* list 2
40* list 3
41=> example.com link list 1
42=> example.com link list 2
43=> example.com link list 3
44
45ok, now for another test:
46will *strong* in-line text be converted?
47as well as `code`, _emph_ and such?
48what if *i _nest_ them*
49what if *i _nest them* wrong_ ?
50what about *breaking them
51over two lines?*
52end-document
53)
54
55;;; Tests
56
57(test "read"
58 '((meta ("title" "a" "test" "document") ("date" "2024-05-13T03:02:45Z") ("uuid" "b3daebf1-440b-4828-a4d9-9089c7bd7c61")) (hdr1 ("a" "test" "document" "of" "some" "kind")) (para "here is a test document." "it has paragraphs" (link "example.com" "with" "links!") "and other things.") (hdr2 ("a" "code" "example")) (verb "for (a=1;a<=4;a++) {" "\tprintf(\"%d\\n\", a);" "}") (hdr3 ("other" "examples")) (quot ("a" "blockquote" "is" "a" "quote") ("that" "is" "blocky.")) (list ("list" "1") ("list" "2") ("list" "3")) (link ("example.com" "link" "list" "1") ("example.com" "link" "list" "2") ("example.com" "link" "list" "3")) (para "ok, now for another test:" "will *strong* in-line text be converted?" "as well as `code`, _emph_ and such?" "what if *i _nest_ them*" "what if *i _nest them* wrong_ ?" "what about *breaking them" "over two lines?*"))
59 (call-with-input-string test-doc parse))
60
61(test-exit)