summaryrefslogtreecommitdiff
path: root/tests/toc/testscript
blob: e4be32520aeb1a777b5b5d4721bded3472ed8a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# file      : tests/toc/testscript
# copyright : Copyright (c) 2009-2019 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