Skip Menu |

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 20970
Status: resolved
Priority: 0/
Queue: YAML-Syck

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.67
Fixed in: (no value)



Subject: A variety of things are not compatible with YAML.pm
The test suite for YAML::Tiny now tests not only compatibility with YAML.pm but also with YAML::Syck. It's thrown up half a dozen cases where Syck doesn't match YAML.pm. To see them all, grab the latest YAML::Tiny and enable the YAML::Syck testing in t/lib/MyTests.pm. I've commented them out for now, until they work. Adam K
This needs review after 1.11 goes in.
I have a proposal. Right now we're cross-certifying YAML and JSON modules. I think this is the wrong approach. What's needed is 2 CPAN modules: Test::YAML::Spec qw($yaml_module_name) and Test::JSON::Spec qw($json_module_name); The modules would be responsible for testing all of the known spec in each direction. We could store these tests in Data::Dumper format if needed, along side their expected output. What do you think? Todd
I think you are underestimating what it would take to test "all" of the YAML specification. As for YAML::Tiny, it isn't there to test compatibility with the YAML specification. It's there to test only the subset that it supports. Writing a compliance test for JSON may well be possible though. I'm not sure how you'd define the tests for things like boolean true and false though, which Perl doesn't support. Adam K On Mon Jul 19 18:24:15 2010, TODDR wrote: Show quoted text
> I have a proposal. Right now we're cross-certifying YAML and JSON > modules. I think this is the > wrong approach. > > What's needed is 2 CPAN modules: > Test::YAML::Spec qw($yaml_module_name) > and > Test::JSON::Spec qw($json_module_name); > > The modules would be responsible for testing all of the known spec in > each direction. We could > store these tests in Data::Dumper format if needed, along side their > expected output. > > What do you think? > > Todd
On Mon Jul 19 22:46:16 2010, ADAMK wrote: Show quoted text
> I think you are underestimating what it would take to test "all" of
the Show quoted text
> YAML specification. > > As for YAML::Tiny, it isn't there to test compatibility with the YAML > specification. It's there to test only the subset that it supports. > > Writing a compliance test for JSON may well be possible though. > > I'm not sure how you'd define the tests for things like boolean true
and Show quoted text
> false though, which Perl doesn't support.
You could have an annotated YAML test suite, so that e.g. there was a t/yaml-tiny/ part of it that would be the only part you would import, but others would test the rest (including YAML::Tiny). It could work similarly to how the Perl 6 "fuzz" tests work, where multiple implementations are being tested with the same test suite using annotations. There would be a lot of value in doing something like that.
Ticket migrated to github as https://github.com/toddr/YAML-Syck/issues/26