Commit 5029e8c9 authored by Sergei Golubchik's avatar Sergei Golubchik

use the correct path separator on windows.

remove duplicates from the --plugin-load list.
$ENV{TERM} can be undefined (on Windows)
parent 3593ca12
...@@ -621,6 +621,7 @@ sub process_opts { ...@@ -621,6 +621,7 @@ sub process_opts {
$tinfo->{$opt_name} = []; $tinfo->{$opt_name} = [];
my @plugins; my @plugins;
my %seen;
foreach my $opt (@opts) foreach my $opt (@opts)
{ {
...@@ -640,7 +641,8 @@ sub process_opts { ...@@ -640,7 +641,8 @@ sub process_opts {
$value= mtr_match_prefix($opt, "--plugin-load="); $value= mtr_match_prefix($opt, "--plugin-load=");
if (defined $value) if (defined $value)
{ {
push @plugins, $value; push @plugins, $value unless $seen{$value};
$seen{$value}=1;
next; next;
} }
...@@ -685,7 +687,8 @@ sub process_opts { ...@@ -685,7 +687,8 @@ sub process_opts {
} }
if (@plugins) { if (@plugins) {
push @{$tinfo->{$opt_name}}, "--plugin-load=" . join(':', @plugins); my $sep = (IS_WIN32PERL) ? ';' : ':';
push @{$tinfo->{$opt_name}}, "--plugin-load=" . join($sep, @plugins);
} }
} }
......
...@@ -5840,7 +5840,7 @@ sub time_format($) { ...@@ -5840,7 +5840,7 @@ sub time_format($) {
my $num_tests; my $num_tests;
sub xterm_stat { sub xterm_stat {
if (-t STDOUT and $ENV{TERM} =~ /xterm/) { if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
my ($left) = @_; my ($left) = @_;
# 2.5 -> best by test # 2.5 -> best by test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment