File: comments.mwtest

package info (click to toggle)
mwparserfromhell 0.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: python: 7,518; ansic: 4,462; sh: 139; makefile: 127
file content (46 lines) | stat: -rw-r--r-- 1,028 bytes parent folder | download | duplicates (5)
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
name:   blank
label:  a blank comment
input:  "<!---->"
output: [CommentStart(), CommentEnd()]

---

name:   basic
label:  a basic comment
input:  "<!-- comment -->"
output: [CommentStart(), Text(text=" comment "), CommentEnd()]

---

name:   tons_of_nonsense
label:  a comment with tons of ignorable garbage in it
input:  "<!-- foo{{bar}}[[basé\n\n]{}{}{}{}]{{{{{{haha{{--a>aa<!--aa -->"
output: [CommentStart(), Text(text=" foo{{bar}}[[basé\n\n]{}{}{}{}]{{{{{{haha{{--a>aa<!--aa "), CommentEnd()]

---

name:   incomplete_blank
label:  a comment that doesn't close
input:  "<!--"
output: [Text(text="<!--")]

---

name:   incomplete_text
label:  a comment that doesn't close, with text
input:  "<!-- foo"
output: [Text(text="<!-- foo")]

---

name:   incomplete_partial_close
label:  a comment that doesn't close, with a partial close
input:  "<!-- foo --\x01>"
output: [Text(text="<!-- foo --\x01>")]

---

name:   incomplete_part_only
label:  a comment that only has a < and !
input:  "<!foo"
output: [Text(text="<!foo")]