mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Bug #1189
- Fixed bug #1189, which caused wide Asian UTF8 characters to be measured as narrow characters (thanks to Roy Zuo).
This commit is contained in:
parent
914447c885
commit
6aa0277749
10 changed files with 45 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue