From 815e669310f5e73d13cc121bd7f6cdaec5b6ec0d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 26 May 2024 22:49:44 -0500 Subject: Updates! I totally forgot to actually commit things for a while, so uh Updates!!! --- tests/run.scm | 21 ++++++++++++++++++++- tests/test.gmi | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 tests/test.gmi (limited to 'tests') 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 ;;; Tests (test "read" - '((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?*")) + '((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?*")) (call-with-input-string test-doc parse)) (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 @@ +: title a test document +: date 2024-05-13T03:02:45Z +: uuid b3daebf1-440b-4828-a4d9-9089c7bd7c61 + +# a test document of some kind + +here is a test document. +it has paragraphs +=> example.com with links! +and other things. + +## a code example +``` +for (a=1;a<=4;a++) { + printf("%d\n", a); +} +``` + +### other examples + +> a blockquote is a quote +> that is blocky. + +* list 1 +* list 2 +* list 3 +=> example.com link list 1 +=> example.com link list 2 +=> example.com link list 3 + +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?* -- cgit 1.4.1-21-gabe81