forward port Thingy newline display fix (Form/Textarea)

This commit is contained in:
Colin Kuskie 2008-11-26 19:13:46 +00:00
parent f0c0c4042d
commit d3f8a075a7
3 changed files with 13 additions and 2 deletions

View file

@ -44,7 +44,7 @@ my $testBlock = [
my $formType = 'textarea';
my $numTests = 7 + scalar @{ $testBlock } + 5;
my $numTests = 7 + scalar @{ $testBlock } + 6;
plan tests => $numTests;
@ -104,6 +104,15 @@ is($txt->getValue("some \ntest \r\nhere"), "some \ntest \r\nhere", 'getValue(new
is($session->form->textarea(undef,"some test here"), "some test here", 'session->form->textarea(undef,text)');
is($session->form->textarea(undef,"some \ntest \r\nhere"), "some \ntest \r\nhere", 'session->form->textarea(undef,newlines)');
###################################################################
#
# getValueAsHtml
#
###################################################################
$txt = WebGUI::Form::Textarea->new($session, { value => "line1\nline2\nline3", });
is($txt->getValueAsHtml, 'line1<br>line2<br>line3', 'getValueAsHtml translates newlines into break tags');
__END__