'From Pharo5.0 of 16 April 2015 [Latest update: #50766] on 24 February 2017 at 7:35:04.456861 am'! PP2CompositeNodeTest subclass: #WebGrammarTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PetitParser2-Tutorial'! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testComment self parse: '' rule: #comment ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElementMalformedExtraClose self parse: 'meh' rule: #element ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElement self parse: '

lorem ipsum

' rule: #element ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElementMalformedWrongClose self parse: 'meh' rule: #element. ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElementEmpty self parse: '' rule: #element ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testDocument | input | input := PP2Sources current htmlSample. self parse: input rule: #document. self assert: result size equals: 2.! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElementMalformedUnclosed self parse: '' rule: #element. ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testJavascriptWithString self parse: ''')' rule: #javascript ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testStructuredDocument | input | input := PP2Sources current htmlSample. self parse: input rule: #structuredDocument! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testJavascript self parse: '' rule: #javascript ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testStructuredDocumentSimple | input | input := ' '. self parse: input rule: #structuredDocument! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testStructuredDocumentWithDoctype | input | input := ' '. self parse: input rule: #structuredDocument! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testText self parse: 'foobar' rule: #text ! ! !WebGrammarTest methodsFor: 'tests' stamp: ' 1/27/2017 07:41:38'! testElementNested self parse: '

lorem ipsum

' rule: #element ! ! !WebGrammarTest methodsFor: 'accessing' stamp: ' 1/27/2017 07:41:38'! parserClass ^ WebGrammar! !