diff options
author | Case Duckworth | 2024-05-26 22:49:44 -0500 |
---|---|---|
committer | Case Duckworth | 2024-05-26 22:52:25 -0500 |
commit | 815e669310f5e73d13cc121bd7f6cdaec5b6ec0d (patch) | |
tree | 1d3ab042bb6ffc2302a0a03b61147e5b4a649960 /tests | |
parent | Scheme bit! (diff) | |
download | jimmy-815e669310f5e73d13cc121bd7f6cdaec5b6ec0d.tar.gz jimmy-815e669310f5e73d13cc121bd7f6cdaec5b6ec0d.zip |
Updates!
I totally forgot to actually commit things for a while, so uh Updates!!!
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run.scm | 21 | ||||
-rw-r--r-- | tests/test.gmi | 37 |
2 files changed, 57 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm index aa5dab1..1ec4ffe 100644 --- a/tests/run.scm +++ b/tests/run.scm | |||
@@ -55,7 +55,26 @@ end-document | |||
55 | ;;; Tests | 55 | ;;; Tests |
56 | 56 | ||
57 | (test "read" | 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?*")) | 58 | '((meta ("title" "a" "test" "document") |
59 | ("date" "2024-05-13T03:02:45Z") | ||
60 | ("uuid" "b3daebf1-440b-4828-a4d9-9089c7bd7c61")) | ||
61 | (hdr1 ("a" "test" "document" "of" "some" "kind")) | ||
62 | (para "here is a test document." "it has paragraphs" (link "example.com" | ||
63 | "with" | ||
64 | "links!") | ||
65 | "and other things.") | ||
66 | (hdr2 ("a" "code" "example")) | ||
67 | (verb "for (a=1;a<=4;a++) {" "\tprintf(\"%d\\n\", a);" "}") | ||
68 | (hdr3 ("other" "examples")) | ||
69 | (quot ("a" "blockquote" "is" "a" "quote") ("that" "is" "blocky.")) | ||
70 | (list ("list" "1") ("list" "2") ("list" "3")) | ||
71 | (link ("example.com" "link" "list" "1") ("example.com" "link" "list" | ||
72 | "2") ("example.com" "link" | ||
73 | "list" "3")) | ||
74 | (para "ok, now for another test:" "will *strong* in-line text be | ||
75 | converted?" "as well as `code`, _emph_ and such?" "what if *i _nest_ them*" | ||
76 | "what if *i _nest them* wrong_ ?" "what about *breaking them" "over two | ||
77 | lines?*")) | ||
59 | (call-with-input-string test-doc parse)) | 78 | (call-with-input-string test-doc parse)) |
60 | 79 | ||
61 | (test-exit) | 80 | (test-exit) |
diff --git a/tests/test.gmi b/tests/test.gmi new file mode 100644 index 0000000..38af5ea --- /dev/null +++ b/tests/test.gmi | |||
@@ -0,0 +1,37 @@ | |||
1 | : title a test document | ||
2 | : date 2024-05-13T03:02:45Z | ||
3 | : uuid b3daebf1-440b-4828-a4d9-9089c7bd7c61 | ||
4 | |||
5 | # a test document of some kind | ||
6 | |||
7 | here is a test document. | ||
8 | it has paragraphs | ||
9 | => example.com with links! | ||
10 | and other things. | ||
11 | |||
12 | ## a code example | ||
13 | ``` | ||
14 | for (a=1;a<=4;a++) { | ||
15 | printf("%d\n", a); | ||
16 | } | ||
17 | ``` | ||
18 | |||
19 | ### other examples | ||
20 | |||
21 | > a blockquote is a quote | ||
22 | > that is blocky. | ||
23 | |||
24 | * list 1 | ||
25 | * list 2 | ||
26 | * list 3 | ||
27 | => example.com link list 1 | ||
28 | => example.com link list 2 | ||
29 | => example.com link list 3 | ||
30 | |||
31 | ok, now for another test: | ||
32 | will *strong* in-line text be converted? | ||
33 | as well as `code`, _emph_ and such? | ||
34 | what if *i _nest_ them* | ||
35 | what if *i _nest them* wrong_ ? | ||
36 | what about *breaking them | ||
37 | over two lines?* | ||