]> gitweb.factorcode.org Git - factor.git/commitdiff
easy-help: adding tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 00:01:27 +0000 (16:01 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 15 Dec 2020 00:01:27 +0000 (16:01 -0800)
extra/easy-help/easy-help-tests.factor [new file with mode: 0644]

diff --git a/extra/easy-help/easy-help-tests.factor b/extra/easy-help/easy-help-tests.factor
new file mode 100644 (file)
index 0000000..3914b2e
--- /dev/null
@@ -0,0 +1,27 @@
+USING: easy-help help.markup tools.test ;
+
+{ { $description } } [ $description{ } ] unit-test
+
+{ { $description "this and that" } } [
+    $description{ this and that }
+] unit-test
+
+{ { $description { $snippet "this" } " and that" } } [
+    $description{ { $snippet "this" } and that }
+] unit-test
+
+{ { $description "this " { $snippet "and" } " that" } } [
+    $description{ this { $snippet "and" } that }
+] unit-test
+
+{ { $description "this and " { $snippet "that" } } } [
+    $description{ this and { $snippet "that" } }
+] unit-test
+
+{ { $description "this and " { $snippet "that" } "." } } [
+    $description{ this and { $snippet "that" } . }
+] unit-test
+
+{ { $description "this, " { $snippet "that" } ", and the other." } } [
+    $description{ this, { $snippet "that" } , and the other. }
+] unit-test