summaryrefslogtreecommitdiff
path: root/tests/toc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/toc')
-rw-r--r--tests/toc/buildfile5
-rw-r--r--tests/toc/testscript (renamed from tests/toc/toc.html)78
-rw-r--r--tests/toc/toc.cli57
3 files changed, 79 insertions, 61 deletions
diff --git a/tests/toc/buildfile b/tests/toc/buildfile
new file mode 100644
index 0000000..36e12c9
--- /dev/null
+++ b/tests/toc/buildfile
@@ -0,0 +1,5 @@
+# file : tests/toc/buildfile
+# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
+# license : MIT; see accompanying LICENSE file
+
+./: test{testscript}
diff --git a/tests/toc/toc.html b/tests/toc/testscript
index 5305db9..76a28eb 100644
--- a/tests/toc/toc.html
+++ b/tests/toc/testscript
@@ -1,11 +1,80 @@
+# file : tests/toc/testscript
+# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
+# license : MIT; see accompanying LICENSE file
+
+test = $effect($cli.path)
+
+: toc
+:
+cat <<EOI >>>toc.cli;
+"\\h1|Table of Contents|"
+"\\\$TOC\$"
+
+"
+\\h0#preface|Preface|
+
+This document describes something awesome.
+
+\\h#about-document|About This Document|
+
+And this document is also awesome.
+
+\\h#more-information|More Information|
+
+It is so awesome that no further information will be required."
+
+"
+\\H#part1|PART I|
+
+Start of part one.
+
+\\h1#intro|Introduction|
+
+Beginning of the first chapter.
+
+\\h#arch-flow|Architecture and Workflow|
+
+Some basics.
+
+\\h#benefits|Benefits|
+
+You will like them.
+
+\\h1#hello|Hello World|
+
+Beginning of the second chapter.
+
+\\h#hell-setup|Setup|
+
+More basics.
+
+\\h#hello-compile|Compiling|
+
+How to build the example
+
+\\h2#hello-compile-gcc|Compiling with GCC|
+
+GCC. For Clang see \\l{#hello-compile-clang Compiling with Clang}.
+
+\\h2#hello-compile-clang|Compiling with Clang|
+
+Clang. For GCC see \\l{#hello-compile-gcc Compiling with GCC}.
+
+\\h#hello-conclusion|Conclusion|
+
+Some remarks.
+"
+EOI
+$* --generate-html --stdout toc.cli >>EOO
<h1>Table of Contents</h1>
<table class="toc">
- <tr><td colspan="2"><a href="#preface">Preface</a>
+ <tr><td class="preface" colspan="2"><a href="#preface">Preface</a>
<table class="toc">
- <tr><td colspan="2"><a href="#about-document">About This
-Document</a></td></tr>
- <tr><td colspan="2"><a href="#more-information">More Information</a></td></tr>
+ <tr><td class="preface" colspan="2"><a href="#about-document">About
+This Document</a></td></tr>
+ <tr><td class="preface" colspan="2"><a href="#more-information">More
+Information</a></td></tr>
</table>
</td></tr>
<tr><th colspan="2"><a href="#part1">PART I</a></th></tr>
@@ -86,3 +155,4 @@ with Clang</a></td></tr>
<p>Some remarks.</p>
+EOO
diff --git a/tests/toc/toc.cli b/tests/toc/toc.cli
deleted file mode 100644
index cb6fd8c..0000000
--- a/tests/toc/toc.cli
+++ /dev/null
@@ -1,57 +0,0 @@
-"\h1|Table of Contents|"
-"\$TOC$"
-
-"
-\h0#preface|Preface|
-
-This document describes something awesome.
-
-\h#about-document|About This Document|
-
-And this document is also awesome.
-
-\h#more-information|More Information|
-
-It is so awesome that no further information will be required."
-
-"
-\H#part1|PART I|
-
-Start of part one.
-
-\h1#intro|Introduction|
-
-Beginning of the first chapter.
-
-\h#arch-flow|Architecture and Workflow|
-
-Some basics.
-
-\h#benefits|Benefits|
-
-You will like them.
-
-\h1#hello|Hello World|
-
-Beginning of the second chapter.
-
-\h#hell-setup|Setup|
-
-More basics.
-
-\h#hello-compile|Compiling|
-
-How to build the example
-
-\h2#hello-compile-gcc|Compiling with GCC|
-
-GCC. For Clang see \l{#hello-compile-clang Compiling with Clang}.
-
-\h2#hello-compile-clang|Compiling with Clang|
-
-Clang. For GCC see \l{#hello-compile-gcc Compiling with GCC}.
-
-\h#hello-conclusion|Conclusion|
-
-Some remarks.
-"