Implementing tests.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-10-25 07:36:34 -05:00
parent e7b2df3776
commit 0d28f0c9f5
2 changed files with 29 additions and 0 deletions

View File

@ -24,6 +24,11 @@ PubPubGrammar >> document [
^ link islandInSea star
]
{ #category : #accessing }
PubPubGrammar >> element [
^ (link / imageLink) star
]
{ #category : #links }
PubPubGrammar >> imageLink [
^ imageLinkLabel, imageLinkContent, alternativeImages

View 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
]