Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test for issue #2

  • Loading branch information...
commit ce76731db39ff24e0c40764e6d6ece03ab194270 1 parent c551b54
@mnunberg authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 t/b100-gh2.t
View
16 t/b100-gh2.t
@@ -0,0 +1,16 @@
+# https://github.com/mnunberg/perl-JSON-SL/issues/2
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More;
+use JSON::SL;
+
+my $j = JSON::SL->new;
+$j->set_jsonpointer(["/^"]);
+
+for my $r ($j->feed('[{"a":5},{"a":null}]')) {
+ $r->{Value}{a} = (defined $r->{Value}{a}) ? "d" : "not d";
+ isnt($r->{Value}->{a}, undef);
+}
+
+done_testing();
Please sign in to comment.
Something went wrong with that request. Please try again.