summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-01 05:14:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-01 05:14:42 (GMT)
commitd9dfed9e47436644bcb7dec24cdb1c1975f70910 (patch)
treec204619c5a97617b48ac5d11c5de9b594abc0e32
parentb439747bc1074f6f325987d6f2b1a38119d3b863 (diff)
parentdb7ed0f20c2929f3054c96497dd1cf482a198c7b (diff)
downloadgit-d9dfed9e47436644bcb7dec24cdb1c1975f70910.zip
git-d9dfed9e47436644bcb7dec24cdb1c1975f70910.tar.gz
git-d9dfed9e47436644bcb7dec24cdb1c1975f70910.tar.bz2
Merge branch 'ab/align-perf-descriptions'
Output from perf tests have been updated to align their titles. * ab/align-perf-descriptions: t/perf: correctly align non-ASCII descriptions in output
-rwxr-xr-xt/perf/aggregate.perl3
-rwxr-xr-xt/perf/p0000-perf-lib-sanity.sh2
2 files changed, 5 insertions, 0 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl
index 924b19d..1dbc85b 100755
--- a/t/perf/aggregate.perl
+++ b/t/perf/aggregate.perl
@@ -88,6 +88,7 @@ for my $t (@tests) {
sub read_descr {
my $name = shift;
open my $fh, "<", $name or return "<error reading description>";
+ binmode $fh, ":utf8" or die "PANIC on binmode: $!";
my $line = <$fh>;
close $fh or die "cannot close $name";
chomp $line;
@@ -147,6 +148,8 @@ for my $t (@subtests) {
my $totalwidth = 3*@dirs+$descrlen;
$totalwidth += $_ for (@colwidth);
+binmode STDOUT, ":utf8" or die "PANIC on binmode: $!";
+
printf "%-${descrlen}s", "Test";
for my $i (0..$#dirs) {
my $d = $dirs[$i];
diff --git a/t/perf/p0000-perf-lib-sanity.sh b/t/perf/p0000-perf-lib-sanity.sh
index cf8e1ef..002c21e 100755
--- a/t/perf/p0000-perf-lib-sanity.sh
+++ b/t/perf/p0000-perf-lib-sanity.sh
@@ -33,6 +33,8 @@ test_perf 'export a weird var' '
test_export bar
'
+test_perf 'éḿíẗ ńöń-ÁŚĆÍÍ ćḧáŕáćẗéŕś' 'true'
+
test_expect_success 'test_export works with weird vars' '
echo "$bar" &&
test "$bar" = "weird # variable"