Pārlūkot izejas kodu

Add a couple tests and fix a couple broken ones.

tags/v0.3
Ben Kurtovic pirms 11 gadiem
vecāks
revīzija
851a9e5863
1 mainītis faili ar 16 papildinājumiem un 2 dzēšanām
  1. +16
    -2
      tests/tokenizer/tags_wikimarkup.mwtest

+ 16
- 2
tests/tokenizer/tags_wikimarkup.mwtest Parādīt failu

@@ -57,7 +57,7 @@ output: [TagOpenOpen(wiki_markup="''"), Text(text="i"), TagCloseOpen(), Text(tex
name: multiline_italics
label: italics spanning mulitple lines
input: "foo\nbar''testing\ntext\nspanning\n\n\n\n\nmultiple\nlines''foo\n\nbar"
output: [Text(text="foo\nbar"), TagOpenOpen(wiki_markup="''"), Text(text="i"), TagCloseOpen(), Text(text="testing\ntext\nspanning\n\n\n\n\nmultiple\nlines"), TagOpenClose(), Text(text="i"), TagCloseClose()]
output: [Text(text="foo\nbar"), TagOpenOpen(wiki_markup="''"), Text(text="i"), TagCloseOpen(), Text(text="testing\ntext\nspanning\n\n\n\n\nmultiple\nlines"), TagOpenClose(), Text(text="i"), TagCloseClose(), Text(text="foo\n\nbar")]

---

@@ -100,7 +100,7 @@ output: [TagOpenOpen(wiki_markup="'''"), Text(text="b"), TagCloseOpen(), Text(te
name: multiline_bold
label: bold spanning mulitple lines
input: "foo\nbar'''testing\ntext\nspanning\n\n\n\n\nmultiple\nlines'''foo\n\nbar"
output: [Text(text="foo\nbar"), TagOpenOpen(wiki_markup="'''"), Text(text="b"), TagCloseOpen(), Text(text="testing\ntext\nspanning\n\n\n\n\nmultiple\nlines"), TagOpenClose(), Text(text="b"), TagCloseClose()]
output: [Text(text="foo\nbar"), TagOpenOpen(wiki_markup="'''"), Text(text="b"), TagCloseOpen(), Text(text="testing\ntext\nspanning\n\n\n\n\nmultiple\nlines"), TagOpenClose(), Text(text="b"), TagCloseClose(), Text(text="foo\n\nbar")]

---

@@ -167,6 +167,20 @@ output: [TagOpenOpen(wiki_markup="'"), Text(text="i"), TagCloseOpen(), Text(text

---

name: four
label: four ticks
input: "foo ''''bar'''' baz"
output: [Text(text="foo '"), TagOpenOpen(wiki_markup="'''"), Text(text="b"), TagCloseOpen(), Text(text="bar'"), TagOpenClose(), Text(text="b"), TagCloseClose(), Text(text=" baz")]

---

name: four_two
label: four ticks to open, two to end
input: "foo ''''bar'' baz"
output: [Text(text="foo ''"), TagOpenOpen(wiki_markup="''"), Text(text="i"), TagCloseOpen(), Text(text="bar"), TagOpenClose(), Text(text="i"), TagCloseClose(), Text(text=" baz")]

---

name: seven
label: seven ticks
input: "'''''''seven'''''''"


Notiek ielāde…
Atcelt
Saglabāt