File: html_comment.t

package info (click to toggle)
discount 2.2.7-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,004 kB
  • sloc: ansic: 5,707; pascal: 1,027; sh: 287; makefile: 208
file content (49 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (9)
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
. tests/functions.sh

title "html comments"

rc=0
MARKDOWN_FLAGS=

try 'html comments' \
    '<!--
**hi**
-->' \
    '<!--
**hi**
-->'
    
try 'comment with trailing text' '<!-- this is -->a test' \
'<p><!-- this is -->a test</p>'

COMMENTS='<!-- 1. -->line 1

<!-- 2. -->line 2'

try 'two comments' "$COMMENTS" \
'<p><!-- 1. -->line 1</p>

<p><!-- 2. -->line 2</p>'

COMMENTS='<!-- 1. -->line 1
<!-- 2. -->line 2'

try 'two adjacent comments' "$COMMENTS" \
'<p><!-- 1. -->line 1
<!-- 2. -->line 2</p>'

try 'comment, no white space' '<!--foo-->' '<!--foo-->'

try 'comment, indented end with trailing text' \
'<!--
    -->00000' \
'<p><!--
    -->00000</p>'

try 'comment with leading text' 'Text text text<!--
    -->' \
'<p>Text text text<!--
    --></p>'

summary $0
exit $rc