Skip to content

Commit 394a149

Browse files
committed
Fixing some tests due to the annotated paragraph changes and the codeblock extra cr in front
1 parent 589d33d commit 394a149

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

src/Pillar-ExporterMicrodown/PRMicrodownWriterTest.class.st

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ PRMicrodownWriterTest >> testAnchor [
7575
PRMicrodownWriterTest >> testAnnotated [
7676
"!!Note Pharo is cool and microdown too."
7777

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

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

85-
self testWithInitialText: (builder rawAnnotated: 'Note' paragraph: 'Pharo is cool
85+
self testWithInitialText: (builder rawAnnotated: 'note' paragraph: 'Pharo is cool
8686
and microdown too'; contents).
87-
self assert: parsedBloc children first label equals: 'Note'.
87+
self assert: parsedBloc children first label equals: 'note'.
8888
]
8989

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

112112
| mictext |
113113
mictext := builder
114+
newLine;
114115
codeblock: self exampleTextMultipleLines
115116
firstLineAssociations: {
116117
('language' -> 'pharo').
@@ -131,7 +132,8 @@ PRMicrodownWriterTest >> testCodeBlockParametersWithValueTrue [
131132
pillar := PRPillarParser new parse: '[[[testcase=true
132133
this is a code block
133134
]]]'.
134-
self assert: (pillar accept: writer) contents equals: '```testcase=true
135+
self assert: (pillar accept: writer) contents equals: '
136+
```testcase=true
135137
this is a code block
136138
```
137139
'
@@ -625,7 +627,7 @@ PRMicrodownWriterTest >> testSimpleCodeBlock [
625627
Pharo
626628
```"
627629

628-
self testWithInitialText: (builder codeblock: self exampleTextMultipleLines
630+
self testWithInitialText: (builder newLine; codeblock: self exampleTextMultipleLines
629631
firstLineAssociations: {('language' -> 'pharo')}; contents)
630632
]
631633

@@ -636,7 +638,7 @@ PRMicrodownWriterTest >> testSimpleCodeBlockWithFirstTag [
636638
Pharo
637639
```"
638640
| mictext |
639-
mictext := builder codeblock: self exampleTextMultipleLines firstLineAssociations: {'language' -> 'Pharo'} ; contents.
641+
mictext := builder newLine; codeblock: self exampleTextMultipleLines firstLineAssociations: {'language' -> 'Pharo'} ; contents.
640642
self testWithInitialText: mictext.
641643
self assert: ('*language*' match: mictext)
642644
]

src/Pillar-ExporterMicrodown/PRPillarToMicrodownConverterTest.class.st

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Point class >> new
3030
'.
3131
result := writer start: pillarobject ; contents.
3232
self assert: result equals:
33-
'```language=pharo&caption=Pointclass
33+
'
34+
```language=pharo&caption=Pointclass
3435
Point class >> new
3536
self foo
3637
```
@@ -47,7 +48,8 @@ Point class >> new
4748
]]]'.
4849
result := writer start: pillarobject ; contents.
4950
self assert: result equals:
50-
'```language=smalltalk
51+
'
52+
```language=smalltalk
5153
Point class >> new
5254
self foo
5355
```
@@ -231,7 +233,8 @@ Point class >> new
231233

232234
result := writer start: pillarobject ; contents.
233235
self assert: result equals:
234-
'```
236+
'
237+
```
235238
Point class >> new
236239
self foo
237240
```

0 commit comments

Comments
 (0)