Home | History | Annotate | Download | only in t
      1 
      2 use strict;
      3 use Test::More tests => 4;
      4 
      5 BEGIN {
      6     $ENV{ PERL_JSON_BACKEND } = $ARGV[0] || 'JSON::backportPP';
      7 }
      8 
      9 use JSON;
     10 
     11 # reported by https://rt.cpan.org/Public/Bug/Display.html?id=68359
     12 
     13 eval { JSON->to_json( 5, { allow_nonref => 1 } ) };
     14 ok($@);
     15 
     16 is( q{"5"}, JSON::to_json( "5", { allow_nonref => 1 } ) );
     17 is( q{5},  JSON::to_json( 5, { allow_nonref => 1 } ) );
     18 is( q{"JSON"}, JSON::to_json( 'JSON', { allow_nonref => 1 } ) );
     19