kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Parsing/output of verbatim tags is incorrect #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. add the following line:
    return false;
to yaml-reader/test.cpp in Inout() at line 73 at the end of the try{} block
so that false is returned if out.str() != out2.str().

2. Compile and run yaml-reader.

What is the expected output? What do you see instead?

The directives.yaml test fails.

What version of the product are you using? On what operating system?

svn head r85
ubuntu hardy x86_64

Please provide any additional information below.

The initial output of the parse of directives.yaml gives:
    ---
    - "basic node"
    - !<!howdy> "yeah baby"
but the output of the parse of the previous output gives:
    ---
    - "basic node"
    - !<!<!howdy>> "yeah baby"

I am not sure if this is an error in the parsing or output (I didn't think
yaml-cpp could emit yaml? Or is it just that there is currently just no way
to construct the nodes necessary to write out the yaml?) and I haven't
looked in to the cause much I'm afraid.  :o(  But I thought I'd report this
anyway.

Original issue reported on code.google.com by e...@waxworlds.org on 26 Sep 2008 at 2:34

GoogleCodeExporter commented 8 years ago
This looks like a mistake in the parsing. I haven't checked the tag handling too
much, so I'm not surprised something like this happened. I'll have a look.

Original comment by jbe...@gmail.com on 20 Nov 2008 at 3:54

GoogleCodeExporter commented 8 years ago
It turned out to be a silly error in output. Two-line fix (see Node::Write, in
node.cpp:139ish).

Original comment by jbe...@gmail.com on 20 Nov 2008 at 4:12