-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #816 from pillar-markup/enhExplanation
Enh explanation
- Loading branch information
Showing
10 changed files
with
178 additions
and
73 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
Class { | ||
#name : 'MicResultTest', | ||
#superclass : 'TestCase', | ||
#category : 'Microdown-BookTester-Tests', | ||
#package : 'Microdown-BookTester-Tests' | ||
} | ||
|
||
{ #category : 'tests' } | ||
MicResultTest >> testExplanationDuplicatedAnchor [ | ||
|
||
| res | | ||
res := MicDuplicatedAnchorResult new. | ||
res anchorLabel: 'ancS0'. | ||
"pay attention since in this package fromFile is pass a fullName and not a file we will have to change | ||
this later" | ||
res source: '/myDir/chapter1.md'. | ||
|
||
self | ||
assert: res explanation | ||
equals: 'Anchor ancS0 is duplicated in file: /myDir/chapter1.md' | ||
|
||
] | ||
|
||
{ #category : 'tests' } | ||
MicResultTest >> testExplanationUndefinedAnchor [ | ||
|
||
| res | | ||
res := MicUndefinedAnchorResult new. | ||
res anchorLabel: 'ancS0'. | ||
"pay attention since in this package fromFile is pass a fullName and not a file we will have to change | ||
this later" | ||
res source: '/myDir/chapter1.md'. | ||
|
||
self | ||
assert: res explanation | ||
equals: 'Anchor ancS0 is undefined in file: /myDir/chapter1.md' | ||
|
||
] | ||
|
||
{ #category : 'tests' } | ||
MicResultTest >> testUndefinedFigureFile [ | ||
|
||
| res | | ||
self skip. | ||
res := MicUndefinedFigureFileResult new. | ||
res inputFileBlock: (MicInputfileBlock new path: 'myDir/foo.md'). | ||
res source: '/myDir/chapter2.md'. | ||
"pay attention since in this package fromFile is pass a fullName and not a file we will have to change | ||
this later" | ||
res source: '/myDir/chapter2.md'. | ||
|
||
self | ||
assert: res explanation | ||
equals: 'File input myDir/foo.md (in file /myDir/chapter2.md) does not exist' | ||
|
||
] | ||
|
||
{ #category : 'tests' } | ||
MicResultTest >> testUndefinedInputFile [ | ||
|
||
| res | | ||
res := MicUndefinedInputFileResult new. | ||
res inputFileBlock: (MicInputfileBlock new path: 'myDir/foo.md'). | ||
res source: '/myDir/chapter2.md'. | ||
"pay attention since in this package fromFile is pass a fullName and not a file we will have to change | ||
this later" | ||
res source: '/myDir/chapter2.md'. | ||
|
||
self | ||
assert: res explanation | ||
equals: 'File input myDir/foo.md (in file /myDir/chapter2.md) does not exist' | ||
|
||
] |
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
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
Oops, something went wrong.