forked from dlc/text--tabulardisplay
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problem found in dlc@4b9bd10#commitcomment-1540416.
- Loading branch information
Showing
4 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ t/13.t | |
t/14.t | ||
t/15.t | ||
t/16.t | ||
t/17.t | ||
TabularDisplay.pm | ||
META.yml Module meta-data (added by MakeMaker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/perl | ||
# vim: set ft=perl: | ||
# Test suggested by Patrick Kuijvenhoven <https://github.com/petski> | ||
# in https://github.com/dlc/text--tabulardisplay/commit/4b9bd105d9ebaf8ac838e8e993216e4b56d85683#commitcomment-1540416 | ||
|
||
use strict; | ||
use Text::TabularDisplay; | ||
use Test; | ||
|
||
BEGIN { | ||
plan tests => 1; | ||
} | ||
|
||
my @data = ( | ||
["a", "b"], | ||
["", ""], | ||
[undef, ""], | ||
["", undef], | ||
[undef, undef], | ||
[0, 0], | ||
); | ||
|
||
my $t = Text::TabularDisplay->new("a", "b"); | ||
$t->populate([ @data ]); | ||
ok($t->render, "+---+---+ | ||
| a | b | | ||
+---+---+ | ||
| a | b | | ||
| | | | ||
| | | | ||
| | | | ||
| | | | ||
| 0 | 0 | | ||
+---+---+"); |