summaryrefslogtreecommitdiff
path: root/xrandr_test.pl
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2007-11-21 16:47:08 +0100
committerMatthias Hopf <mhopf@suse.de>2007-11-21 16:47:08 +0100
commit3347c849462b737a873a279c24d17c873667c821 (patch)
tree22af64baa3b7cfabd42144d613b395c952406ab3 /xrandr_test.pl
parent81e8f2f5673befded3320424f4511e322d41c80b (diff)
Be more robust in test case if mode database is borked.
If modes are reported multiple times per output only bother for the last.
Diffstat (limited to 'xrandr_test.pl')
-rwxr-xr-xxrandr_test.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/xrandr_test.pl b/xrandr_test.pl
index 2da737e..1b2690c 100755
--- a/xrandr_test.pl
+++ b/xrandr_test.pl
@@ -226,10 +226,12 @@ sub t {
while (<P>) {
$out.=$_;
if (/^\s+\d+x\d+\s/) {
- $r{$o}="$r{$o} $x:$m\@?($c)";
+ $r{$o}="$x:$m\@?($c)" unless defined $r{$o};
+ # we don't have to reparse this - something is wrong anyway,
+ # and it probably is no relevant resolution as well
last;
} elsif (/^\s+v:.*?([0-9.]+)Hz\s*$/) {
- $r{$o}="$r{$o} $x:$m\@$1($c)";
+ $r{$o}="$x:$m\@$1($c)";
last;
}
}