diff options
author | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-05-13 21:29:31 +0200 |
---|---|---|
committer | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-05-13 21:29:31 +0200 |
commit | f5cb35b87255ebbe2d322bcedde6bc7d5f6aebae (patch) | |
tree | 161ec305fb4bef388dee6f50ed1c3ed842d55a2b /t |
* Initial commit
Diffstat (limited to 't')
-rw-r--r-- | t/test1.chn | 14 | ||||
-rw-r--r-- | t/test2.chn | 19 | ||||
-rw-r--r-- | t/test3.chn | 3 |
3 files changed, 36 insertions, 0 deletions
diff --git a/t/test1.chn b/t/test1.chn new file mode 100644 index 0000000..f55fb70 --- /dev/null +++ b/t/test1.chn @@ -0,0 +1,14 @@ +{@define}{@author}{Thomas Albers Raviola}% +{@define}{@today}{May 12, 2024}% +{@define}{@printdate}{{@lambda}{@date}{the date is @date}}% +{@section}{Introduction} + +Hello, this is a sample of a program written in chains + +Chains was created by @author to help him write articles of questionable +usefulness. + +{@printdate}{@today} +{@section}[Conclusion] + +idk man, guess it works, don't it? diff --git a/t/test2.chn b/t/test2.chn new file mode 100644 index 0000000..a637b61 --- /dev/null +++ b/t/test2.chn @@ -0,0 +1,19 @@ +{@define}{@html-element}{{@lambda}{@name}{{@lambda}{@attr @content}{<@name @attr> +@content +</@name>}}}% +% +% +{@define}{@html-html}{{@html-element}{html}}% +{@define}{@html-head}{{@html-element}{head}}% +{@define}{@html-body}{{@html-element}{body}}% +{@define}{@html-title}{{@html-element}{title}}% +{@define}{@html-h1}{{@html-element}{h1}}% +{@define}{@html-p}{{@html-element}{p}}% +% +% +{@html-html}{}{% +{@html-head}{}{{@html-title}{}{Website}}% + +{@html-body}{}{ +{@html-h1}{}{Chains test} +{@html-p}{}{Hello World!}}} diff --git a/t/test3.chn b/t/test3.chn new file mode 100644 index 0000000..d989187 --- /dev/null +++ b/t/test3.chn @@ -0,0 +1,3 @@ +{@define}{@define-function}{{@syntax}{@name @args @body}{{@define}{@name}{{@lambda}{@args}{@body}}}}% +{@define-function}{@foo}{@a}{hola @a}% +%{@foo}{mundo} |