Help language development. Donate to The Perl Foundation

Terminal::Table cpan:ALOREN last updated on 2020-11-07

use Test;
use Terminal::Table::Style;
use Terminal::Table::String;
use Terminal::Table::Settings;

plan 6;
my $str =  "It's a string.\t\nAnother Line.";

my $string = => $str, style => => <red on_black>));

isa-ok($string, Str, "String is inherit from Str.");

is($str, $string);

is($string.width, expand-width($str, tabstop()));

ok($string.coloured(), "String can have color style.");

nok($string.coloured(), "Disable color style.");

ok($string.coloured(), "Enable color style.");