#!/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");
