Permalink
Browse files

test for explicit die on unsupported nesting

  • Loading branch information...
renormalist committed Apr 12, 2012
1 parent 6ba523e commit 183db0f1915fe3e67402c1df5d7dd369247bb534
Showing with 18 additions and 0 deletions.
  1. +18 −0 t/app_dpath.t
View
@@ -78,4 +78,22 @@ check (qw(cfggeneral yaml), '//home', [ "/usr/home/max" ]);
check (qw(cfggeneral yaml), '//mono//bl', [ 2 ]);
check (qw(cfggeneral yaml), '//log', [ "/usr/log/logfile" ]);
+diag 'Ignore output warnings about "Unsupported innermost nesting"...';
+
+my $program;
+my $infile;
+my $path;
+my $ret;
+
+$program = "$^X -Ilib script/dpath";
+$infile = "t/flatabledata.yaml";
+
+$path = "//UnsupportedInnermostHash";
+$ret = system("$program -o flat '$path' $infile");
+isnt ($ret, 0, "deny unsupported innermost HASH");
+
+$path = "//UnsupportedInnermostArray";
+$ret = system("$program -o flat '$path' $infile");
+isnt ($ret, 0, "deny unsupported innermost ARRAY");
+
done_testing;

0 comments on commit 183db0f

Please sign in to comment.