yaml / yaml-test-suite

Comprehensive, language independent Test Suite for YAML
MIT License
172 stars 58 forks source link

Support flow style check in start events #33

Closed asomov closed 2 years ago

asomov commented 6 years ago

Let us add support to check flow style in MappingStartEvent and SequenceStartEvent ( '+MAP {}' and '+SEQ []') I would like to use it in SnakeYAML.

How can I help ?

perlpunk commented 6 years ago

Yeah, I'd like to have that too. Most processors in the yaml-editor already output this information, only libyaml and nimyaml missing.

asomov commented 6 years ago

@perlpunk : I can update all the generated files. But I do not know how to incorporate it back to the source.

As far as I understand libyaml and nimyaml can keep using the current version of tests data until the flow style is implemented.

perlpunk commented 6 years ago

my approach would be to let yaml-cpp generate the files (because it outputs the information already and has the fewest incorrect results). But you also can do it, if you want. We could then compare our results. I think I know how I'd put the results back into the source tml files.

just need to check with @ingydotnet as he also wanted to work on the tml files.

asomov commented 6 years ago

Unfortunately, I do not understand how the source files are created and maintained and how the results are generated. The wiki is does not have the information how to contribute the tests.

perlpunk commented 4 years ago

I think I can add this in one of the next releases. Currently building new docker images https://github.com/yaml/yaml-runtimes There are still some views that don't output this yet:

perlpunk commented 4 years ago

@flyx Would it be possible to support that in NimYAML?

flyx commented 4 years ago

@perlpunk Possible, but no trivial modification. Representation information of collections is currently not retained in the event tree. Interestingly, there is a compile-time switch to bake in information about scalar style which is not enabled by default, I can't remember why I put it there since it seems to be unused in everything but the server for the testing ground. Anyway, this shows me where I would need to modify stuff to enable style reporting in collections. I think I could implement it next weekend.

perlpunk commented 4 years ago

@flyx cool. No hurry ;-) It will take a while until I convert the testsuite events. But then I don't need to program an exception into the test matrix, if every lib is able to output that.

perlpunk commented 2 years ago

It took a bit longer, but the test-event now has flow style information, see #84 . A data release is planned in the near future

asomov commented 2 years ago

As far as I understand, this is already done