Skip to content

Commit

Permalink
Fixing some tests due to the annotated paragraph changes and the code…
Browse files Browse the repository at this point in the history
…block extra cr in front
  • Loading branch information
Ducasse committed Aug 21, 2024
1 parent 589d33d commit 394a149
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
16 changes: 9 additions & 7 deletions src/Pillar-ExporterMicrodown/PRMicrodownWriterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ PRMicrodownWriterTest >> testAnchor [
PRMicrodownWriterTest >> testAnnotated [
"!!Note Pharo is cool and microdown too."

self testWithInitialText: (builder rawAnnotated: 'Note' paragraph: 'Pharo is cool and microdown too'; contents).
self assert: parsedBloc children first label equals: 'Note'.
self testWithInitialText: (builder rawAnnotated: 'note' paragraph: 'Pharo is cool and microdown too'; contents).
self assert: parsedBloc children first label equals: 'note'.
]

{ #category : 'tests - annotated' }
PRMicrodownWriterTest >> testAnnotatedOnMultipleLines [

self testWithInitialText: (builder rawAnnotated: 'Note' paragraph: 'Pharo is cool
self testWithInitialText: (builder rawAnnotated: 'note' paragraph: 'Pharo is cool
and microdown too'; contents).
self assert: parsedBloc children first label equals: 'Note'.
self assert: parsedBloc children first label equals: 'note'.
]

{ #category : 'tests - formatting' }
Expand All @@ -111,6 +111,7 @@ PRMicrodownWriterTest >> testCodeBlockCaptionContainsMonospace [

| mictext |
mictext := builder
newLine;
codeblock: self exampleTextMultipleLines
firstLineAssociations: {
('language' -> 'pharo').
Expand All @@ -131,7 +132,8 @@ PRMicrodownWriterTest >> testCodeBlockParametersWithValueTrue [
pillar := PRPillarParser new parse: '[[[testcase=true
this is a code block
]]]'.
self assert: (pillar accept: writer) contents equals: '```testcase=true
self assert: (pillar accept: writer) contents equals: '
```testcase=true
this is a code block
```
'
Expand Down Expand Up @@ -625,7 +627,7 @@ PRMicrodownWriterTest >> testSimpleCodeBlock [
Pharo
```"

self testWithInitialText: (builder codeblock: self exampleTextMultipleLines
self testWithInitialText: (builder newLine; codeblock: self exampleTextMultipleLines
firstLineAssociations: {('language' -> 'pharo')}; contents)
]

Expand All @@ -636,7 +638,7 @@ PRMicrodownWriterTest >> testSimpleCodeBlockWithFirstTag [
Pharo
```"
| mictext |
mictext := builder codeblock: self exampleTextMultipleLines firstLineAssociations: {'language' -> 'Pharo'} ; contents.
mictext := builder newLine; codeblock: self exampleTextMultipleLines firstLineAssociations: {'language' -> 'Pharo'} ; contents.
self testWithInitialText: mictext.
self assert: ('*language*' match: mictext)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Point class >> new
'.
result := writer start: pillarobject ; contents.
self assert: result equals:
'```language=pharo&caption=Pointclass
'
```language=pharo&caption=Pointclass
Point class >> new
self foo
```
Expand All @@ -47,7 +48,8 @@ Point class >> new
]]]'.
result := writer start: pillarobject ; contents.
self assert: result equals:
'```language=smalltalk
'
```language=smalltalk
Point class >> new
self foo
```
Expand Down Expand Up @@ -231,7 +233,8 @@ Point class >> new

result := writer start: pillarobject ; contents.
self assert: result equals:
'```
'
```
Point class >> new
self foo
```
Expand Down

0 comments on commit 394a149

Please sign in to comment.