Skip to content

Commit

Permalink
Additional fixes for #3
Browse files Browse the repository at this point in the history
  • Loading branch information
zbentley committed Jul 29, 2016
1 parent 3cf1ee5 commit 4c80210
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Text-Table/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ t/10_Table.t
t/11_Variable_Rule.t
t/12_column_seps_as_hashes.t
t/13_callback_rules_with_whitespace.t
t/14_overload.t
t/cpan-changes.t
t/pod-coverage.t
t/pod.t
Expand Down
4 changes: 4 additions & 0 deletions Text-Table/t/14_overload.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ local *Text::Table::stringify = sub { return $res{called} = "1"; };
my $table = Text::Table->new;

$table->add(1,1);
# TEST
ok(! delete $res{called}, "add in void context doesn't stringify()");

$table->load([1,1]);
# TEST
ok(! delete $res{called}, "load in void context doesn't stringify()");

if ( $table ) {}
# TEST
ok(! delete $res{called}, "use as a boolean doesn't stringify()");

my $var = "$table";
# TEST
ok(delete $res{called}, "use as a string calls stringify()");

0 comments on commit 4c80210

Please sign in to comment.