- Fixed bug #1189, which caused wide Asian UTF8 characters to be measured as
  narrow characters (thanks to Roy Zuo).
This commit is contained in:
Paul Beckingham 2013-03-02 18:22:21 -05:00
parent 914447c885
commit 6aa0277749
10 changed files with 45 additions and 36 deletions

View file

@ -40,15 +40,17 @@ if (open my $fh, '>', '455.rc')
ok (-r '455.rc', 'Created 455.rc');
}
# Bug #455 - Text alignment in reports is broken when text contains utf8 characters
# Bug #455 - Text alignment in reports is broken when text contains wide utf8
# characters
qx{../src/task rc:455.rc add abc pro:Bar\x{263A} 2>&1};
qx{../src/task rc:455.rc add def pro:Foo! 2>&1};
my $output = qx{../src/task rc:455.rc ls 2>&1};
like ($output, qr/\s{7}abc/ms, 'bug 455 - correct spacing in utf8 task');
like ($output, qr/\s{7}def/ms, 'bug 455 - correct spacing in non utf8 task');
# ' ' + 'Pri' + ' ' == 5
like ($output, qr/\S\s{5}abc/ms, 'bug 455 - correct spacing in utf8 task');
like ($output, qr/\S\s{5}def/ms, 'bug 455 - correct spacing in non utf8 task');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key 455.rc);