ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/t/22_comment_at_eof.t
(Generate patch)

Comparing JSON-XS/t/22_comment_at_eof.t (file contents):
Revision 1.2 by root, Wed Jan 6 08:02:19 2010 UTC vs.
Revision 1.3 by root, Thu Jan 7 06:35:43 2010 UTC

1# provided by makamaka@donzoko.net. 1# provided by IKEGAMI@cpan.org
2 2
3use strict; 3use strict;
4use warnings; 4use warnings;
5 5
6use Test::More tests => 12; 6use Test::More tests => 13;
7 7
8use JSON::XS; 8use JSON::XS;
9 9
10use Data::Dumper qw( Dumper ); 10use Data::Dumper qw( Dumper );
11 11
40is( decoder( " " ), 'undef', 'space ignored before eof' ); 40is( decoder( " " ), 'undef', 'space ignored before eof' );
41is( decoder( "\n" ), 'undef', 'newline ignored before eof' ); 41is( decoder( "\n" ), 'undef', 'newline ignored before eof' );
42is( decoder( "#,foo\n" ), 'undef', 'comment ignored before eof' ); 42is( decoder( "#,foo\n" ), 'undef', 'comment ignored before eof' );
43is( decoder( "# []o\n" ), 'undef', 'comment ignored before eof' ); 43is( decoder( "# []o\n" ), 'undef', 'comment ignored before eof' );
44 44
45is( decoder(qq/#\n[#foo\n"#\\n"#\n]/), '["#\n"]', 'array and string in multiple lines' );
46

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines