Hi,
Stéph and I are trying to revive Coral. There is a unit test that fails:
self assert: (CLIParameterParser boolean) fail: #('falsely').
CLIParameterParser class>>boolean | trueToken falseToken | trueToken := (self caseInsensitiveKeywords: #('true' 'yes')) end ==> [:token | true]. falseToken := (self caseInsensitiveKeywords: #('false' 'no')) end ==> [:token | false]. ^ self new setParser: (PPElementParser on: trueToken / falseToken message: 'boolean expected'); name: 'bool'
CLIParameterParser class>>caseInsensitiveKeywords: aCollection ^ (PPChoiceParser withAll: (aCollection collect: [ :each | each asParser caseInsensitive ])) token
I don't know if this test used to pass but I guess it did. I think the problem is in the new work around "contexts".
Can somebody please help?
On Tue, Feb 10, 2015 at 2:33 PM, Damien Cassou damien.cassou@gmail.com wrote:
Can somebody please help?
it looks like this problem has been fixed in a recent commit. Would it be possible to push get a new stable version with that fix in?
Hey,
I tried to figure out, what was the problem, but I failed to see it. What is the commit that fixed the problem?
If I run:
ConfigurationOfCoral loadDevelopment.
(CLIParameterParser boolean) parse: 'falsely'.
I get a Failure, which is what I expect. If I run all the tests, the only failing one is #testSimpleClassDefWithPackage.
Cheers, Jan
On 10 February 2015 at 14:39, Damien Cassou damien.cassou@gmail.com wrote:
On Tue, Feb 10, 2015 at 2:33 PM, Damien Cassou damien.cassou@gmail.com wrote:
Can somebody please help?
it looks like this problem has been fixed in a recent commit. Would it be possible to push get a new stable version with that fix in?
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
I tried to figure out, what was the problem, but I failed to see it. What is the commit that fixed the problem?
CLIParsingTest>>#testBool. CLIParsingTest>>#testOptionLong. CLIParsingTest>>#testOptionShort.
for this tests to succeed you need a stable version with this package:
Name: PetitParser-JanKurs.267 Author: JanKurs Time: 12 January 2015, 2:55:31.864538 pm UUID: 740a4b6d-4dbc-494b-8c17-becf6f9cd8a9 Ancestors: PetitParser-JanKurs.266
PetitParser does not return nil, if the furthest failure is not registered.
at least, i don't know much about the other packages that are included in PetitParser.
In order to reproduce this you have to take a pharo30 image and do
Gofer it smalltalkhubUser: 'PharoExtras' project: 'Coral'; configurationOf: 'Coral'; load.
(Smalltalk at: #ConfigurationOfCoral) loadDevelopment.
then you run coral tests and see the three failing tests, after that you load the mentioned package and run the tests again, they will succeed.
HTH, Bernardo