Implementing tests.
This commit is contained in:
parent
e7b2df3776
commit
0d28f0c9f5
@ -24,6 +24,11 @@ PubPubGrammar >> document [
|
||||
^ link islandInSea star
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PubPubGrammar >> element [
|
||||
^ (link / imageLink) star
|
||||
]
|
||||
|
||||
{ #category : #links }
|
||||
PubPubGrammar >> imageLink [
|
||||
^ imageLinkLabel, imageLinkContent, alternativeImages
|
||||
|
24
src/MiniDocs/PubPubGrammarTest.class.st
Normal file
24
src/MiniDocs/PubPubGrammarTest.class.st
Normal file
@ -0,0 +1,24 @@
|
||||
Class {
|
||||
#name : #PubPubGrammarTest,
|
||||
#superclass : #PP2CompositeNodeTest,
|
||||
#category : #'MiniDocs-Model'
|
||||
}
|
||||
|
||||
{ #category : #accessing }
|
||||
PubPubGrammarTest >> parserClass [
|
||||
^ PubPubGrammar
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PubPubGrammarTest >> testImageLink [
|
||||
self
|
||||
parse: '![This is an image label](this/is/an/image/link){this are alternate image sizes}'
|
||||
rule: #imageLink
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
PubPubGrammarTest >> testLink [
|
||||
self
|
||||
parse: '[This is a label]{this/is/a/link}'
|
||||
rule: #link
|
||||
]
|
Loading…
Reference in New Issue
Block a user