-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/testcases' of https://github.com/hpi-swa-teaching/M…
…arkdownEditor.git into fix/testcases
- Loading branch information
Showing
19 changed files
with
220 additions
and
98 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
packages/MarkdownEditor-Core.package/MarkdownTextStyler.class/instance/styleListItemWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
styling | ||
styleListItemWith: aMarkdownList | ||
styleListItemWith: aMarkdownListItem | ||
|
||
self text | ||
addAllAttributes: (aMarkdownList textAttributes) | ||
from: (aMarkdownList startPosition) | ||
to: (aMarkdownList endPosition). | ||
aMarkdownList children | ||
addAllAttributes: (aMarkdownListItem textAttributes) | ||
from: (aMarkdownListItem startPosition) | ||
to: (aMarkdownListItem endPosition). | ||
aMarkdownListItem children | ||
do: [:child | child applyStylingWith: self] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/MarkdownEditor-Parsing.package/MarkdownCodeSpan.class/instance/convertWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
html | ||
convertWith: anHtmlConverter | ||
|
||
^self htmlOpeningTag, self code, self htmlClosingTag | ||
^ self htmlOpeningTag, self code, self htmlClosingTag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tance/comparePotentialOpenerAndCloser..st → ...s/instance/compareOpenClosingProperty..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ges/MarkdownEditor-Tests.package/MarkdownParserTest.class/instance/testListItemSpaces3.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList2.st → ...serTest.class/instance/testParseList02.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList3.st → ...serTest.class/instance/testParseList03.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList4.st → ...serTest.class/instance/testParseList04.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList5.st → ...serTest.class/instance/testParseList05.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList6.st → ...serTest.class/instance/testParseList06.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList7.st → ...serTest.class/instance/testParseList07.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rserTest.class/instance/testParseList8.st → ...serTest.class/instance/testParseList08.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
packages/MarkdownEditor-Tests.package/MarkdownParserTest.class/instance/testParseList09.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
tests - lists | ||
testParseList09 | ||
|
||
| output document list listItem paragraph listItem2 listItem3 paragraph2 paragraph3 paragraph4 listItem4 | | ||
output := parser parse: '- foo | ||
- bar | ||
- baz | ||
- boo'. | ||
list := MarkdownList new. | ||
listItem := MarkdownListItem new. | ||
listItem2 := MarkdownListItem new. | ||
listItem3 := MarkdownListItem new. | ||
listItem4 := MarkdownListItem new. | ||
paragraph := MarkdownParagraph new. | ||
paragraph2 := MarkdownParagraph new. | ||
paragraph3 := MarkdownParagraph new. | ||
paragraph4 := MarkdownParagraph new. | ||
document := MarkdownDocument new | ||
startPosition: 1; | ||
endPosition: 29; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {list}); | ||
yourself. | ||
list | ||
container: document; | ||
startPosition: 1; | ||
endPosition: 29; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {listItem. listItem2. listItem3. listItem4}); | ||
indentation: 5; | ||
listMarker: '-'; | ||
beUnordered. | ||
listItem | ||
container: list; | ||
startPosition: 1; | ||
endPosition: 6; | ||
innerLine: 'foo', Character cr; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph}); | ||
beUnordered; | ||
listMarker: '-'; | ||
indentation: 2. | ||
paragraph | ||
container: listItem; | ||
startPosition: 3; | ||
endPosition: 6; | ||
innerStartPosition: 3; | ||
content: 'foo'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'foo' startingAt: 3}). | ||
listItem2 | ||
container: list; | ||
startPosition: 7; | ||
endPosition: 13; | ||
innerLine: 'bar', Character cr; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph2}); | ||
beUnordered; | ||
listMarker: '-'; | ||
indentation: 3. | ||
paragraph2 | ||
container: listItem2; | ||
startPosition: 10; | ||
endPosition: 13; | ||
innerStartPosition: 10; | ||
content: 'bar'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'bar' startingAt: 10}). | ||
listItem3 | ||
container: list; | ||
startPosition: 14; | ||
endPosition: 21; | ||
innerLine: 'baz', Character cr; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph3}); | ||
beUnordered; | ||
listMarker: '-'; | ||
indentation: 4. | ||
paragraph3 | ||
container: listItem3; | ||
startPosition: 18; | ||
endPosition: 21; | ||
innerStartPosition: 18; | ||
content: 'baz'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'baz' startingAt: 18}). | ||
listItem4 | ||
container: list; | ||
startPosition: 22; | ||
endPosition: 29; | ||
innerLine: 'boo'; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph4}); | ||
beUnordered; | ||
listMarker: '-'; | ||
indentation: 5. | ||
paragraph4 | ||
container: listItem4; | ||
startPosition: 27; | ||
endPosition: 29; | ||
innerStartPosition: 27; | ||
content: 'boo'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'boo' startingAt: 27}). | ||
|
||
self assert: document equals: output |
80 changes: 80 additions & 0 deletions
80
packages/MarkdownEditor-Tests.package/MarkdownParserTest.class/instance/testParseList10.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
tests - lists | ||
testParseList10 | ||
|
||
| output document list listItem paragraph listItem2 listItem3 paragraph3 | | ||
output := parser parse: '1. foo | ||
2. | ||
3. bar'. | ||
list := MarkdownList new. | ||
listItem := MarkdownListItem new. | ||
listItem2 := MarkdownListItem new. | ||
listItem3 := MarkdownListItem new. | ||
paragraph := MarkdownParagraph new. | ||
paragraph3 := MarkdownParagraph new. | ||
document := MarkdownDocument new | ||
startPosition: 1; | ||
endPosition: 16; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {list}); | ||
yourself. | ||
list | ||
container: document; | ||
startPosition: 1; | ||
endPosition: 16; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {listItem. listItem2. listItem3}); | ||
indentation: 3; | ||
listMarker: '.'; | ||
startNumber: 1; | ||
beOrdered. | ||
listItem | ||
container: list; | ||
startPosition: 1; | ||
endPosition: 7; | ||
innerLine: 'foo', Character cr; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph}); | ||
beOrdered; | ||
listMarker: '.'; | ||
indentation: 3; | ||
number: 1. | ||
paragraph | ||
container: listItem; | ||
startPosition: 4; | ||
endPosition: 7; | ||
innerStartPosition: 4; | ||
content: 'foo'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'foo' startingAt: 4}). | ||
listItem2 | ||
container: list; | ||
startPosition: 8; | ||
endPosition: 10; | ||
innerLine: ''; | ||
beClosed; | ||
beOrdered; | ||
listMarker: '.'; | ||
indentation: 3; | ||
number: 2. | ||
listItem3 | ||
container: list; | ||
startPosition: 11; | ||
endPosition: 16; | ||
innerLine: 'bar'; | ||
beClosed; | ||
children: (OrderedCollection newFrom: {paragraph3}); | ||
beOrdered; | ||
listMarker: '.'; | ||
indentation: 3; | ||
number: 3. | ||
paragraph3 | ||
container: listItem; | ||
startPosition: 14; | ||
endPosition: 16; | ||
innerStartPosition: 14; | ||
content: 'bar'; | ||
beClosed; | ||
inlineElements: (MarkdownLinkedList newFrom: | ||
{MarkdownString newFrom: 'bar' startingAt: 14}). | ||
self assert: document equals: output |
69 changes: 0 additions & 69 deletions
69
packages/MarkdownEditor-Tests.package/MarkdownParserTest.class/instance/testParseList9.st
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.