summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorsvu <svu>2004-05-07 18:27:21 +0000
committersvu <svu>2004-05-07 18:27:21 +0000
commit3b913e0be63cc45cf87b6ea2b2b501558405aea4 (patch)
treee4bbbcb4c0eadd2cb1935b725fbae2c09781ab58 /tests
parent27500e1766f2c076e8d41e2cb31b70a993f3f5d1 (diff)
Some small fixes made. Options are now testable as well.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/testLayouts.pl2
-rwxr-xr-xtests/testOptions.pl2
-rwxr-xr-xtests/xkbTestFunc.pm10
3 files changed, 11 insertions, 3 deletions
diff --git a/tests/testLayouts.pl b/tests/testLayouts.pl
index bcb657b..9d996a7 100755
--- a/tests/testLayouts.pl
+++ b/tests/testLayouts.pl
@@ -8,6 +8,6 @@ xkbTestFunc::backupXkbSettings();
xkbTestFunc::dumpXkbSettingsBackup();
-xkbTestFunc::testLevel2( "layout", "variant", 2, "(", ")", 1, 1 );
+xkbTestFunc::testLevel2( "layout", "variant", 2, "(", ")", 1, 1, 0 );
xkbTestFunc::restoreXkbSettings();
diff --git a/tests/testOptions.pl b/tests/testOptions.pl
index c880579..ec45a06 100755
--- a/tests/testOptions.pl
+++ b/tests/testOptions.pl
@@ -8,6 +8,6 @@ xkbTestFunc::backupXkbSettings();
xkbTestFunc::dumpXkbSettingsBackup();
-xkbTestFunc::testLevel2( "group", "option", 4, ":", "", 0, 0 );
+xkbTestFunc::testLevel2( "group", "option", 4, ":", "", 0, 0, 1 );
xkbTestFunc::restoreXkbSettings();
diff --git a/tests/xkbTestFunc.pm b/tests/xkbTestFunc.pm
index d78c16d..8d51121 100755
--- a/tests/xkbTestFunc.pm
+++ b/tests/xkbTestFunc.pm
@@ -98,7 +98,7 @@ sub testLevel1
sub testLevel2
{
- my ( $type, $subtype, $idx, $delim1, $delim2, $ifCheckLevel1, $ifAddLevel1 ) = @_;
+ my ( $type, $subtype, $idx, $delim1, $delim2, $ifCheckLevel1, $ifAddLevel1, $ifResetToDefault ) = @_;
open ( XSLTPROC, "xsltproc --stringparam type $type listCIs.xsl ../rules/base.xml.in |" ) or
die ( "Could not start xsltproc" );
@@ -113,6 +113,10 @@ sub testLevel2
if ( $ifCheckLevel1 )
{
my @params = defaultXkbSettings();
+ if ( $ifResetToDefault )
+ {
+ setXkbSettings ( @params );
+ }
$params[$idx] = "$paramValue";
dumpXkbSettings ( @params );
setXkbSettings ( @params );
@@ -130,6 +134,10 @@ sub testLevel2
my $paramValue2=$1;
print " --- $subtype: [$paramValue2]\n";
my @params = defaultXkbSettings();
+ if ( $ifResetToDefault )
+ {
+ setXkbSettings ( @params );
+ }
if ( $ifAddLevel1 )
{
$params[$idx] = "$paramValue$delim1$paramValue2$delim2";