Skip to content

Commit 34999d4

Browse files
committed
Adding some tests for the configuration handling.
1 parent d5c6d75 commit 34999d4

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Class {
2+
#name : 'ConfigurationForPillarTest',
3+
#superclass : 'TestCase',
4+
#category : 'Pillar-Chrysal',
5+
#package : 'Pillar-Chrysal'
6+
}
7+
8+
{ #category : 'as yet unclassified' }
9+
ConfigurationForPillarTest >> configurationDictionary [
10+
11+
^ STONJSON fromString: '{
12+
"language" : "en-UK",
13+
"base_url" : "",
14+
"attribution" : "Stéphane Ducasse and Guillermo Polito",
15+
"keywords" : "Interpreters, languages, Pharo, Smalltalk",
16+
"title" : "Fun with Interpreters in Pharo",
17+
"series" : "The Pharo Booklet Collection — edited by S. Ducasse",
18+
"htmlWriter" : "html",
19+
"latexWriter" : "miclatex:sbabook",
20+
"bibFile" : "others.bib",
21+
"checkers" : [ "Vocabulary" , "EnglishTypography" ],
22+
"checkerConfigurations" :
23+
[
24+
"Vocabulary" :
25+
[
26+
[
27+
"sub-presenter",
28+
"subpresenter"
29+
],
30+
[
31+
"sub presenter",
32+
"subpresenter"
33+
],
34+
[
35+
"meta object",
36+
"metaobject"
37+
]
38+
]
39+
]
40+
}'
41+
42+
]
43+
44+
{ #category : 'as yet unclassified' }
45+
ConfigurationForPillarTest >> testCheckers [
46+
47+
| configuration |
48+
49+
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary.
50+
self
51+
assert: (configuration at: 'checkers')
52+
equals: #('Vocabulary' 'EnglishTypography')
53+
54+
55+
56+
57+
58+
]
59+
60+
{ #category : 'as yet unclassified' }
61+
ConfigurationForPillarTest >> testCheckersConfiguration [
62+
63+
| configuration |
64+
65+
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary.
66+
self
67+
assert: (configuration at: 'checkerConfigurations')
68+
equals: {'Vocabulary'->#(#('sub-presenter' 'subpresenter') #('sub presenter' 'subpresenter') #('meta object' 'metaobject'))}
69+
70+
71+
]

src/Pillar-Cli-BookTester/ClapPillarBookTesterCommand.class.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ClapPillarBookTesterCommand >> execute [
3030
file exists
3131
ifTrue: [
3232
| reporter parent |
33+
self halt.
3334
parent := self project baseDirectory.
3435
reporter := MicAnalysisReportWriter
3536
reportForFolder: parent startingFrom: file.

0 commit comments

Comments
 (0)