summaryrefslogtreecommitdiff
path: root/tests/note/testscript
blob: 1e302bd92d3b429a5894bdb5264561b68f2be86a (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
# file      : tests/note/testscript
# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC
# license   : MIT; see accompanying LICENSE file

test = $effect($cli.path)

: block-basics
:
cat <<EOI >=test.cli;
"
Leading paragraph.

\N|This is a note block one.|

Interleaving paragraph.

\N|This is a note block two.|

Trailing paragraph.
"
EOI
$* --generate-html --stdout test.cli >>EOO
  <p>Leading paragraph.</p>

  <div class="note">
  <p>This is a note block one.</p>
  </div>

  <p>Interleaving paragraph.</p>

  <div class="note">
  <p>This is a note block two.</p>
  </div>

  <p>Trailing paragraph.</p>

EOO

: block-multi-para
:
cat <<EOI >=test.cli;
"
\N|
This is a note para one.

This is a note para two.
|
"
EOI
$* --generate-html --stdout test.cli >>EOO
  <div class="note">
  <p>This is a note para one.</p>

  <p>This is a note para two.</p>
  </div>

EOO

: span-basics
:
cat <<EOI >=test.cli;
"
This is normal text. \N{This is a note.} And this is normal text again.
"
EOI
$* --generate-html --stdout test.cli >>EOO
  <p>This is normal text. <span class="note">This is a note.</span> And this
  is normal text again.</p>

EOO

: span-nested-link
:
cat <<EOI >=test.cli;
"
\N{This is a note with a \l{https://example.com link} inside.}
"
EOI
$* --generate-html --stdout test.cli >>EOO
  <p><span class="note">This is a note with a <a
  href="https://example.com">link</a> inside.</span></p>

EOO