From 9d0bbd4c95511203906efff9619b15aab8cd95ef Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Tue, 26 Jun 2012 17:10:45 -0500 Subject: [PATCH] Added several quote tests. * Added tests by different quote sequence signatures -- primarily to stress parsoid in different situations and figure out/document where Parsoid needs to conform with PHP parser output and where it is acceptable to diverge. * Some of these tests can likely be purged since they don't test anything beyond what is already tested elsewhere, but I haven't investigated that yet. But, there is probably no harm in a few duplicated tests. Change-Id: Id2c7b3ea4dac5f9e8f9b042b439061bf9faea9f2 --- tests/parser/parserTests.txt | 280 ++++++++++++++++++++++++++++++++++- 1 file changed, 279 insertions(+), 1 deletion(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index fd24016bcd..ece2a9c137 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -134,6 +134,285 @@ Italics and bold !! end +### +### 2-quote opening sequence tests +### +!! test +Italics and bold: 2-quote opening sequence: (2,2) +!! input +''foo'' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,3) +!! input +''foo''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,4) +!! input +''foo'''' +!! result +

foo'' +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,5) +!! input +''foo''''' +!! result +

foo +

+!!end + + +### +### 3-quote opening sequence tests +### + +!! test +Italics and bold: 3-quote opening sequence: (3,2) +!! input +'''foo'' +!! result +

'foo +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,3) +!! input +'''foo''' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,4) +!! input +'''foo'''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,5) +!! input +'''foo''''' +!! result +

foo +

+!!end + + +### +### 4-quote opening sequence tests +### + +!! test +Italics and bold: 4-quote opening sequence: (4,2) +!! input +''''foo'' +!! result +

''foo +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,3) +!! input +''''foo''' +!! result +

'foo +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,4) +!! input +''''foo'''' +!! result +

'foo' +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,5) +!! input +''''foo''''' +!! result +

'foo +

+!!end + + +### +### 5-quote opening sequence tests +### + +!! test +Italics and bold: 5-quote opening sequence: (5,2) +!! input +'''''foo'' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,3) +!! input +'''''foo''' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,4) +!! input +'''''foo'''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,5) +!! input +'''''foo''''' +!! result +

foo +

+!!end + +### +### multiple quote sequences in a line +### +!! test +Italics and bold: multiple quote sequences: (2,4,2) +!! input +''foo''''bar'' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (2,4,3) +!! input +''foo''''bar''' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (2,4,4) +!! input +''foo''''bar'''' +!! result +

foo'bar' +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (3,4,2) +!! input +'''foo''''bar'' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (3,4,3) +!! input +'''foo''''bar''' +!! result +

foo'bar +

+!!end + +### +### other quote tests +### +!! test +Italics and bold: other quote tests: (2,3,5) +!! input +''this is about '''foo's family''''' +!! result +

this is about foo's family +

+!!end + + +!! test +Italics and bold: other quote tests: (2,(3,3),2) +!! input +''this is about '''foo's''' family'' +!! result +

this is about foo's family +

+!!end + + +!! test +Italics and bold: other quote tests: (3,2,3,2) +!! input +'''this is about ''foo'''s family'' +!! result +

this is about foos family +

+!!end + + +!! test +Italics and bold: other quote tests: (3,2,3,3) +!! input +'''this is about ''foo'''s family''' +!! result +

'this is about foos family +

+!!end + + + +!! test +Italics and bold: other quote tests: (3,(2,2),3) +!! input +'''this is about ''foo's'' family''' +!! result +

this is about foo's family +

+!!end + ### ### test cases ### @@ -9902,7 +10181,6 @@ Definition Lists: Weird Ones: Test 1 !! end - TODO: more images more tables -- 2.20.1