File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 5
5
use File::Basename;
6
6
7
7
use utf8;
8
+ use open qw( :std :utf8) ; # http://stackoverflow.com/a/519359
8
9
binmode STDOUT ,' :utf8' ;
9
10
10
11
my $remove_file_add_header = 1;
Original file line number Diff line number Diff line change @@ -62,3 +62,9 @@ if begin[m"
62
62
run printf " %s" " $output "
63
63
assert_line --index 1 --partial " modified: cancel.png (binary)" ;
64
64
}
65
+
66
+ @test " Handle unicode characters in diff output" {
67
+ output=$( load_fixture " unicode" | $diff_so_fancy )
68
+ run printf " %s" " $output "
69
+ assert_line --index 5 --partial " åäöç"
70
+ }
Original file line number Diff line number Diff line change
1
+ [1;33mdiff --git a/unicodes b/unicodes[m
2
+ [1;33mindex 223f57d..1c2066d 100644[m
3
+ [1;33m--- a/unicodes[m
4
+ [1;33m+++ b/unicodes[m
5
+ [1;35m@@ -1 +1 @@[m
6
+ [1;31m-aao[m
7
+ [1;32m+[m[1;32måäöç[m
You can’t perform that action at this time.
0 commit comments