summaryrefslogtreecommitdiff
path: root/debian/tests/keymaps
blob: 7efa36f1d36aeb2b0cfb38655a86a3da418c10bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/perl

# $Id: $
# Copyright (c) 2003 Alastair McKinstry <mckinstry@computer.org>
# This program is distributed under the terms of the GPL.

package KeymapTest;

use strict;
use Test::Unit;
use File::Find();

# for the convenience of &wanted calls, including -eval statements:
# use vars qw/*name *dir *prune/;
*name   = *File::Find::name;
*dir    = *File::Find::dir;
*prune  = *File::Find::prune;

sub wanted {
	my ($dev,$ino,$mode,$nlink,$uid,$gid);

    (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
    -f _;
}
	


sub new { 
	my $self = shift()->SUPER::new(@_);
	# add state here
	return $self;
}

sub set_up {
	# Store the default keymap, and ensure loadkeys works
	system("dumpkeys > /tmp/keys") || die "Failed to dumpkeys";
}


sub tear_down {
	# Restore the default keymap
	# FIXME
	print STDERR "in tear_down\n";
}

#
# All keymaps should load correctly without errors
# or warnings
sub test_loadok {
	print "FIXME Write this\n";
	return 0;
}

# 
# All keymaps for Euro countries should have the euro and cent
#
sub test_euro {
	print "FIXME: Write euro_present test\n";
	return 0;
}

package RunKeymapTest;
use Test::Unit;
create_suite("KeymapTest");
run_suite("KeymapTest");