[Rt-commit] r18232 - in rt/3.999/branches/merge_to_3.8.2: t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Feb 5 02:46:46 EST 2009
Author: sunnavy
Date: Thu Feb 5 02:46:45 2009
New Revision: 18232
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/t/web/basic.t
Log:
r19610 at sunnavys-mb: sunnavy | 2009-02-05 14:20:49 +0800
string encode fix
Modified: rt/3.999/branches/merge_to_3.8.2/t/web/basic.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/web/basic.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/web/basic.t Thu Feb 5 02:46:45 2009
@@ -39,11 +39,9 @@
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->form_number(3);
# Start with a string containing characters in latin1
-my $string = "I18N Web Testing æøå";
-my $web_string = $string;
-Encode::from_to($web_string, 'iso-8859-1', 'utf8');
+my $string = Encode::decode_utf8("I18N Web Testing æøå");
$agent->field('subject' => "Ticket with utf8 body");
-$agent->field('content' => $web_string);
+$agent->field('content' => $string);
ok($agent->submit(), "Created new ticket with $string as content");
like( $agent->{'content'}, qr{$string} , "Found the content");
ok($agent->{redirected_uri}, "Did redirection");
@@ -52,10 +50,8 @@
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->form_number(3);
# Start with a string containing characters in latin1
-$string = "I18N Web Testing æøå";
-$web_string = $string;
-Encode::from_to($web_string, 'iso-8859-1', 'utf8');
-$agent->field('subject' => $web_string);
+$string = Encode::decode_utf8("I18N Web Testing æøå");
+$agent->field('subject' => $string);
$agent->field('content' => "Ticket with utf8 subject");
ok($agent->submit(), "Created new ticket with $string as subject");
More information about the Rt-commit
mailing list