diff options
author | svu <svu> | 2004-05-06 00:05:32 +0000 |
---|---|---|
committer | svu <svu> | 2004-05-06 00:05:32 +0000 |
commit | a0551c9c11129b1c31cda2383787083c22fdd90a (patch) | |
tree | 16d2bb98bd5db02f2f687dce95fc261f701de939 /tests | |
parent | 3fe2bc8f3ec6e67e5bef35fe79fed7c54a1a12fa (diff) | |
download | xkeyboard-config-a0551c9c11129b1c31cda2383787083c22fdd90a.tar.gz |
Yahoo! Models test pased ok!
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/testLayouts.pl | 3 | ||||
-rw-r--r-- | tests/testModels.pl | 9 | ||||
-rwxr-xr-x | tests/xkbTestFunc.pm | 38 |
3 files changed, 28 insertions, 22 deletions
diff --git a/tests/testLayouts.pl b/tests/testLayouts.pl index c022e64..f172ebf 100755 --- a/tests/testLayouts.pl +++ b/tests/testLayouts.pl @@ -1,11 +1,12 @@ #!/bin/env perl use strict; +use warnings; use xkbTestFunc; backupXkbSettings(); -dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ); +dumpXkbSettingsBackup(); testLevel2( "layout", "variant", 2, "(", ")" ); diff --git a/tests/testModels.pl b/tests/testModels.pl index f740f6a..42e2a4c 100644 --- a/tests/testModels.pl +++ b/tests/testModels.pl @@ -1,12 +1,13 @@ #!/bin/env perl use strict; +use warnings; use xkbTestFunc; -backupXkbSettings(); +xkbTestFunc::backupXkbSettings(); -dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ); +xkbTestFunc::dumpXkbSettingsBackup(); -testLevel1( "model", 1 ); +xkbTestFunc::testLevel1( "model", 1 ); -restoreXkbSettings(); +xkbTestFunc::restoreXkbSettings(); diff --git a/tests/xkbTestFunc.pm b/tests/xkbTestFunc.pm index aaed2a8..b612088 100755 --- a/tests/xkbTestFunc.pm +++ b/tests/xkbTestFunc.pm @@ -1,12 +1,15 @@ -#!/bin/env perl +package xkbTestFunc; use strict; +use warnings; -my $origXkbRules; -my $origXkbModel; -my $origXkbLayouts; -my $origXkbOptions; -my $origXkbVariants; +our $VERSION='1.00'; + +our $origXkbRules; +our $origXkbModel; +our $origXkbLayouts; +our $origXkbOptions; +our $origXkbVariants; sub backupXkbSettings { @@ -63,6 +66,11 @@ sub dumpXkbSettings print "options: [$xkbOptions]\n" ; } +sub dumpXkbSettingsBackup +{ + dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ); +} + sub testLevel1 { my ( $type, $idx ) = @_; @@ -77,7 +85,7 @@ sub testLevel1 my $paramValue=$1; print "--- setting $type: [$paramValue]\n"; my @params = defaultXkbSettings(); - @params[$idx] = $paramValue; + $params[$idx] = $paramValue; dumpXkbSettings ( @params ); setXkbSettings ( @params ); #print "--- dump:\n"; @@ -102,7 +110,7 @@ sub testLevel2 print "--- scanning $type: [$paramValue]\n"; my @params = defaultXkbSettings(); - @params[$idx] = "$paramValue"; + $params[$idx] = "$paramValue"; dumpXkbSettings ( @params ); setXkbSettings ( @params ); #print "--- dump:\n"; @@ -118,24 +126,20 @@ sub testLevel2 my $paramValue2=$1; print " --- $subtype: [$paramValue2]\n"; my @params = defaultXkbSettings(); - @params[$idx] = "$paramValue$delim1$paramValue2$delim2"; + $params[$idx] = "$paramValue$delim1$paramValue2$delim2"; dumpXkbSettings ( @params ); setXkbSettings ( @params ); #print "--- dump:\n"; #dumpXkbSettings( getXkbSettings() ); } } - close XSLTPROa2C; + close XSLTPROC2; } } close XSLTPROC; } -backupXkbSettings(); - -dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ); - -#testLevel1( "model", 1 ); -testLevel2( "layout", "variant", 2, "(", ")" ); +1; +__END__ -restoreXkbSettings(); +No docs yet |