瀏覽代碼

Add a couple tests and fix a couple broken ones.

tags/v0.3
Ben Kurtovic 11 年之前
父節點
當前提交
851a9e5863
共有 1 個檔案被更改,包括 16 行新增2 行删除
  1. +16
    -2
      tests/tokenizer/tags_wikimarkup.mwtest

+ 16
- 2
tests/tokenizer/tags_wikimarkup.mwtest 查看文件

@@ -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'''''''"


Loading…
取消
儲存