summaryrefslogtreecommitdiff
path: root/tests/toc/testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/toc/testscript')
-rw-r--r--tests/toc/testscript158
1 files changed, 158 insertions, 0 deletions
diff --git a/tests/toc/testscript b/tests/toc/testscript
new file mode 100644
index 0000000..76a28eb
--- /dev/null
+++ b/tests/toc/testscript
@@ -0,0 +1,158 @@
+# 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 class="preface" colspan="2"><a href="#preface">Preface</a>
+ <table class="toc">
+ <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>
+ <tr><th>1</th><td><a href="#intro">Introduction</a>
+ <table class="toc">
+ <tr><th>1.1</th><td><a href="#arch-flow">Architecture and
+Workflow</a></td></tr>
+ <tr><th>1.2</th><td><a href="#benefits">Benefits</a></td></tr>
+ </table>
+ </td></tr>
+ <tr><th>2</th><td><a href="#hello">Hello World</a>
+ <table class="toc">
+ <tr><th>2.1</th><td><a href="#hell-setup">Setup</a></td></tr>
+ <tr><th>2.2</th><td><a href="#hello-compile">Compiling</a>
+ <table class="toc">
+ <tr><th>2.2.1</th><td><a href="#hello-compile-gcc">Compiling with
+GCC</a></td></tr>
+ <tr><th>2.2.2</th><td><a href="#hello-compile-clang">Compiling
+with Clang</a></td></tr>
+ </table>
+ </td></tr>
+ <tr><th>2.3</th><td><a href="#hello-conclusion">Conclusion</a></td></tr>
+ </table>
+ </td></tr>
+ </table>
+
+ <h1 id="preface" class="preface">Preface</h1>
+
+ <p>This document describes something awesome.</p>
+
+ <h2 id="about-document">About This Document</h2>
+
+ <p>And this document is also awesome.</p>
+
+ <h2 id="more-information">More Information</h2>
+
+ <p>It is so awesome that no further information will be required.</p>
+
+ <h1 id="part1" class="part">PART I</h1>
+
+ <p>Start of part one.</p>
+
+ <h1 id="intro">1 Introduction</h1>
+
+ <p>Beginning of the first chapter.</p>
+
+ <h2 id="arch-flow">1.1 Architecture and Workflow</h2>
+
+ <p>Some basics.</p>
+
+ <h2 id="benefits">1.2 Benefits</h2>
+
+ <p>You will like them.</p>
+
+ <h1 id="hello">2 Hello World</h1>
+
+ <p>Beginning of the second chapter.</p>
+
+ <h2 id="hell-setup">2.1 Setup</h2>
+
+ <p>More basics.</p>
+
+ <h2 id="hello-compile">2.2 Compiling</h2>
+
+ <p>How to build the example</p>
+
+ <h3 id="hello-compile-gcc">2.2.1 Compiling with GCC</h3>
+
+ <p>GCC. For Clang see <a href="#hello-compile-clang">Compiling with
+ Clang</a>.</p>
+
+ <h3 id="hello-compile-clang">2.2.2 Compiling with Clang</h3>
+
+ <p>Clang. For GCC see <a href="#hello-compile-gcc">Compiling with
+ GCC</a>.</p>
+
+ <h2 id="hello-conclusion">2.3 Conclusion</h2>
+
+ <p>Some remarks.</p>
+
+EOO