37 lines
719 B
Smalltalk
37 lines
719 B
Smalltalk
|
Class {
|
||
|
#name : 'PPPreceedsParserTest',
|
||
|
#superclass : 'PPParserTest',
|
||
|
#instVars : [
|
||
|
'parser'
|
||
|
],
|
||
|
#category : 'PetitMarkdown-Tests'
|
||
|
}
|
||
|
|
||
|
{ #category : 'as yet unclassified' }
|
||
|
PPPreceedsParserTest >> testLiteral [
|
||
|
| foo |
|
||
|
foo := 'foo' asParser.
|
||
|
parser := foo, (foo preceeds: 3).
|
||
|
|
||
|
self assert: parser parse: 'foo'.
|
||
|
]
|
||
|
|
||
|
{ #category : 'as yet unclassified' }
|
||
|
PPPreceedsParserTest >> testLiteral2 [
|
||
|
| foo |
|
||
|
foo := 'foo' asParser.
|
||
|
parser := foo, (foo preceeds: 2).
|
||
|
|
||
|
self assert: parser fail: 'foo'.
|
||
|
]
|
||
|
|
||
|
{ #category : 'as yet unclassified' }
|
||
|
PPPreceedsParserTest >> testLiteral3 [
|
||
|
| foo bar |
|
||
|
foo := 'foo' asParser.
|
||
|
bar := 'bar' asParser.
|
||
|
parser := foo, (bar preceeds: 3).
|
||
|
|
||
|
self assert: parser fail: 'foo'.
|
||
|
]
|