From f5cb35b87255ebbe2d322bcedde6bc7d5f6aebae Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Mon, 13 May 2024 21:29:31 +0200 Subject: * Initial commit --- t/test1.chn | 14 ++++++++++++++ t/test2.chn | 19 +++++++++++++++++++ t/test3.chn | 3 +++ 3 files changed, 36 insertions(+) create mode 100644 t/test1.chn create mode 100644 t/test2.chn create mode 100644 t/test3.chn (limited to 't') 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 +}}}% +% +% +{@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} -- cgit v1.2.3