Closed GoogleCodeExporter closed 9 years ago
May I also add, that if I put 's into the key before saving it. The output
result is '''steak:cow''': '11'
Original comment by mnmill...@gmail.com
on 5 May 2013 at 12:05
The last question asks YOU to provide us with a failing test (which is the best
way to describe the problem)
I tried to create a test myself out of your code:
http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyam
l/issues/issue176/SingleQuoteTest.java
I do not see any problem here. Feel free to change the test to identify your
expectations.
If you think single quotes are missing, can you please explain why do you
expect to see single quotes ?
Original comment by py4fun@gmail.com
on 5 May 2013 at 2:32
[deleted comment]
By the way.
This YAML is valid:
cows:
steak:cow: '11'
this is its canonical form:
%YAML 1.1
---
!!map {
? !!str "cows"
: !!map {
? !!str "steak:cow"
: !!str "11",
},
}
...
The colon (:) is not allowed in plain scalars in flow mode. But you have
explicitly set block mode in the code. Try to remove this settings and you will
get:
cows: {'steak:cow': '11'}
Original comment by py4fun@gmail.com
on 5 May 2013 at 3:59
I say it's invalid because when I read it, I get "11", not "cow".
Original comment by mnmill...@gmail.com
on 5 May 2013 at 7:50
[deleted comment]
Indeed '11' is the value, 'cow' is a part of the key.
As you can see a failing test is the best way to show the problem. Can you
please attach a test ?
Original comment by py4fun@gmail.com
on 5 May 2013 at 10:20
What more can I provide to this issue?
I store the key steak:cow, but I do not get 11 if I use that key, but cow:11
However, if I use steak as the key, I get cow also.
Original comment by mnmill...@gmail.com
on 11 May 2013 at 9:33
Oh, a test case.
Sure, I'll make one as soon as I can.
Original comment by mnmill...@gmail.com
on 11 May 2013 at 9:34
http://pastebin.com/Yktm3x6n
That now contains a test case, that fails.
Original comment by mnmill...@gmail.com
on 12 May 2013 at 2:20
Well, the test you have provided works properly for me.
1) what is the exact environment ? (the JDK version, the OS version)
2) what do you get if you run the tests which I have extracted from your file ?
(http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeya
ml/issues/issue176/SingleQuoteTest.java) Does the whole test suite work for you
?
Original comment by py4fun@gmail.com
on 12 May 2013 at 8:02
After running the test again, it works fine. No idea what was going wrong that
time or earlier.
Original comment by mnmill...@gmail.com
on 15 May 2013 at 9:46
I think this issue is the prove that a report without a failing test should not
be accepted. We could have won a week if the test is provided in the very
beginning.
(it is still unclear why to wait a few days to answer with one sentence...)
Original comment by py4fun@gmail.com
on 16 May 2013 at 4:21
Original issue reported on code.google.com by
mnmill...@gmail.com
on 5 May 2013 at 12:01Attachments: