From: Brion Vibber Date: Mon, 5 Jun 2006 21:28:53 +0000 (+0000) Subject: More section extraction tests: trailing comments, starting comments (bug 2587), inval... X-Git-Tag: 1.31.0-rc.0~56892 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=a237a8aeec826888cabdd033aef34dbfa587acce;p=lhc%2Fweb%2Fwiklou.git More section extraction tests: trailing comments, starting comments (bug 2587), invalid trailing text --- diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index d2070d739e..1d33b2dcdb 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -4663,6 +4663,122 @@ start ===ca=== !! end +!! test +Section extraction test (nonexistent section 11) +!! options +section=11 +!! input +start +==a== +===aa=== +====aaa==== +==b== +===ba=== +===bb=== +====bba==== +===bc=== +==c== +===ca=== +!! result +!! end + +!! test +Section extraction test with bogus heading (section 1) +!! options +section=1 +!! input +==a== +==bogus== not a legal section +==b== +!! result +==a== +==bogus== not a legal section +!! end + +!! test +Section extraction test with bogus heading (section 2) +!! options +section=2 +!! input +==a== +==bogus== not a legal section +==b== +!! result +==b== +!! end + +!! test +Section extraction test with comment after heading (section 1) +!! options +section=1 +!! input +==a== +==legal== +==b== +!! result +==a== +!! end + +!! test +Section extraction test with comment after heading (section 2) +!! options +section=2 +!! input +==a== +==legal== +==b== +!! result +==legal== +!! end + +!! test +Section extraction test with bogus heading (section 1) +!! options +section=1 +!! input +==a== +==bogus== not a legal section +==b== +!! result +==a== +==bogus== not a legal section +!! end + +!! test +Section extraction test with bogus heading (section 2) +!! options +section=2 +!! input +==a== +==bogus== not a legal section +==b== +!! result +==b== +!! end + + +!! test +Section extraction prefixed by comment (section 1) (bug 2587) +!! options +section=1 +!! input +==sec1== +==sec2== +!!result +==sec1== +!!end + +!! test +Section extraction prefixed by comment (section 2) (bug 2587) +!! options +section=2 +!! input +==sec1== +==sec2== +!!result +==sec2== +!!end + # #