summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-07-20 14:14:56 +0300
committerSergey Poznyakoff <gray@gnu.org>2015-07-20 14:16:38 +0300
commit64cf5fdb880815ff21652ddb74e48490dd2f56fe (patch)
treee91d3946e4ad36a4c103d7224b6d6b4eaa7d38c0 /testdata
parentc41c19ff0b19cbca7c850239bfa11295a674f520 (diff)
downloadwikitrans-64cf5fdb880815ff21652ddb74e48490dd2f56fe.tar.gz
wikitrans-64cf5fdb880815ff21652ddb74e48490dd2f56fe.tar.bz2
Fix parsing of headers. Add more tests.
* WikiTrans/wikimarkup.py (delim): Use [ \t] instead of \s. (parse0): Undo c41c19ff. * testdata/headings.html: Update. * testdata/nowiki-ind.html: New file. * testdata/nowiki-ind.wiki: New file. * testdata/nowiki-tag.html: New file. * testdata/nowiki-tag.wiki: New file. * testdata/nowiki.html: New file. * testdata/nowiki.wiki: New file. * tests/test.py: Add new files.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/headings.html6
-rw-r--r--testdata/nowiki-ind.html5
-rw-r--r--testdata/nowiki-ind.wiki9
-rw-r--r--testdata/nowiki-tag.html1
-rw-r--r--testdata/nowiki-tag.wiki1
-rw-r--r--testdata/nowiki.html1
-rw-r--r--testdata/nowiki.wiki1
7 files changed, 21 insertions, 3 deletions
diff --git a/testdata/headings.html b/testdata/headings.html
index 0ec26ac..4dd1203 100644
--- a/testdata/headings.html
+++ b/testdata/headings.html
@@ -1,9 +1,9 @@
-<h2> Section headings </h2>
+<h2>Section headings</h2>
<p><i>Headings</i> organize your writing into
sections. The Wiki software can automatically
-generate a <a href="http://pl.wiktionary.org/wiki/table%20of%20contents">table of contents</a> from them.</p><h3> Subsection </h3>
-<p>Using more "equals" (=) signs creates a subsection.</p><h4> A smaller subsection </h4>
+generate a <a href="http://pl.wiktionary.org/wiki/table%20of%20contents">table of contents</a> from them.</p><h3>Subsection</h3>
+<p>Using more "equals" (=) signs creates a subsection.</p><h4>A smaller subsection</h4>
<p>Don't skip levels,
like from two to four equals signs.</p><p>Start with 2 equals signs not 1
diff --git a/testdata/nowiki-ind.html b/testdata/nowiki-ind.html
new file mode 100644
index 0000000..b2bd72c
--- /dev/null
+++ b/testdata/nowiki-ind.html
@@ -0,0 +1,5 @@
+<p>Para</p><pre>
+ a
+ b
+ c
+</pre><p>para</p>
diff --git a/testdata/nowiki-ind.wiki b/testdata/nowiki-ind.wiki
new file mode 100644
index 0000000..9d315a0
--- /dev/null
+++ b/testdata/nowiki-ind.wiki
@@ -0,0 +1,9 @@
+Para
+
+<nowiki>
+ a
+ b
+ c
+</nowiki>
+
+para
diff --git a/testdata/nowiki-tag.html b/testdata/nowiki-tag.html
new file mode 100644
index 0000000..58b96fc
--- /dev/null
+++ b/testdata/nowiki-tag.html
@@ -0,0 +1 @@
+<p>A <tag></p> \ No newline at end of file
diff --git a/testdata/nowiki-tag.wiki b/testdata/nowiki-tag.wiki
new file mode 100644
index 0000000..9aca78b
--- /dev/null
+++ b/testdata/nowiki-tag.wiki
@@ -0,0 +1 @@
+A <<nowiki/>tag>
diff --git a/testdata/nowiki.html b/testdata/nowiki.html
new file mode 100644
index 0000000..346d0c3
--- /dev/null
+++ b/testdata/nowiki.html
@@ -0,0 +1 @@
+<p>#:version=1.0<i>rest</i> of line</p>
diff --git a/testdata/nowiki.wiki b/testdata/nowiki.wiki
new file mode 100644
index 0000000..6c7833c
--- /dev/null
+++ b/testdata/nowiki.wiki
@@ -0,0 +1 @@
+<nowiki>#:version=1.0</nowiki>''rest'' of line

Return to:

Send suggestions and report system problems to the System administrator.