aboutsummaryrefslogtreecommitdiffstats
path: root/test/check-probe-using-X
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-17 14:31:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-17 14:31:55 +0000
commitf4702f7a0ca670b3cc4ac289749d420f85dd34f7 (patch)
tree3e455d4ee48b396e2483edd3f04c7d13b6dd7df0 /test/check-probe-using-X
parentef2a6d00cc20aaa72d339329c5e99c8f94130de5 (diff)
downloadmonitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.gz
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.bz2
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.xz
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.zip
add monitor-probe and monitor-probe-using-X
Diffstat (limited to 'test/check-probe-using-X')
-rwxr-xr-xtest/check-probe-using-X26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/check-probe-using-X b/test/check-probe-using-X
new file mode 100755
index 0000000..d3ff316
--- /dev/null
+++ b/test/check-probe-using-X
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+use MDK::Common;
+
+foreach my $file (glob("Xorg.*")) {
+ my %wanted = cat_($file) =~ /\(=> (\S+): (\S+)\)/g;
+
+ my %got = map {
+ (Resolution => /(\S+)/);
+ } `../monitor-probe-using-X $file`;
+
+ my @missing = difference2([ keys %wanted ], [ keys %got ]);
+ if (@missing) {
+ warn "for $file, missing: ", join(' ', @missing), "\n";
+ }
+
+ my @surprise = difference2([ keys %got ], [ keys %wanted ]);
+ if (@surprise) {
+ warn "for $file, surprise: ", join(' ', map { "$_: $got{$_}" } @surprise), "\n";
+ }
+
+ my @bad = grep { $wanted{$_} ne $got{$_} } intersection([ keys %wanted ], [ keys %got ]);
+ if (@bad) {
+ warn "for $file, bad $_: $wanted{$_} != $got{$_}\n" foreach @bad;
+ }
+}