Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A variety of things are not compatible with YAML.pm [rt.cpan.org #20970] #26

Open
toddr opened this issue May 11, 2017 · 0 comments
Open

Comments

@toddr
Copy link
Member

toddr commented May 11, 2017

Migrated from rt.cpan.org#20970 (status was 'open')

Requestors:

From [email protected] on 2006-08-13 12:33:18:

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

From [email protected] on 2010-07-16 03:38:46:

This needs review after 1.11 goes in.

From [email protected] on 2010-07-19 22:24:15:

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

From [email protected] on 2010-07-20 02:46:16:

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:
> 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


From [email protected] on 2010-07-23 23:35:40:

On Mon Jul 19 22:46:16 2010, ADAMK wrote:
> 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant