kbd: add tests and update them

This commit is contained in:
davidak 2021-04-11 05:25:53 +02:00
parent fabdd46503
commit 513143fe4e
2 changed files with 27 additions and 4 deletions

View file

@ -107,17 +107,32 @@ in pkgs.lib.mapAttrs mkKeyboardTest {
altgr.expect = [ "~" "#" "{" "[" "|" ];
};
extraConfig.console.keyMap = "azerty/fr";
extraConfig.console.keyMap = "fr";
extraConfig.services.xserver.layout = "fr";
};
bone = {
tests = {
layer1.qwerty = [ "f" "j" ];
layer1.expect = [ "e" "n" ];
layer2.qwerty = [ "shift-f" "shift-j" "shift-6" ];
layer2.expect = [ "E" "N" "$" ];
layer3.qwerty = [ "caps_lock-d" "caps_lock-f" ];
layer3.expect = [ "{" "}" ];
};
extraConfig.console.keyMap = "bone";
extraConfig.services.xserver.layout = "de";
extraConfig.services.xserver.xkbVariant = "bone";
};
colemak = {
tests = {
homerow.qwerty = [ "a" "s" "d" "f" "j" "k" "l" "semicolon" ];
homerow.expect = [ "a" "r" "s" "t" "n" "e" "i" "o" ];
};
extraConfig.console.keyMap = "colemak/colemak";
extraConfig.console.keyMap = "colemak";
extraConfig.services.xserver.layout = "us";
extraConfig.services.xserver.xkbVariant = "colemak";
};
@ -129,9 +144,13 @@ in pkgs.lib.mapAttrs mkKeyboardTest {
symbols.qwerty = [ "q" "w" "e" "minus" "equal" ];
symbols.expect = [ "'" "," "." "[" "]" ];
};
extraConfig.console.keyMap = "dvorak";
extraConfig.services.xserver.layout = "us";
extraConfig.services.xserver.xkbVariant = "dvorak";
};
dvp = {
dvorak-programmer = {
tests = {
homerow.qwerty = [ "a" "s" "d" "f" "j" "k" "l" "semicolon" ];
homerow.expect = [ "a" "o" "e" "u" "h" "t" "n" "s" ];
@ -142,6 +161,7 @@ in pkgs.lib.mapAttrs mkKeyboardTest {
symbols.expect = [ "&" "[" "{" "}" "(" "=" "*" ")" "+" "]" "!" ];
};
extraConfig.console.keyMap = "dvorak-programmer";
extraConfig.services.xserver.layout = "us";
extraConfig.services.xserver.xkbVariant = "dvp";
};
@ -156,6 +176,7 @@ in pkgs.lib.mapAttrs mkKeyboardTest {
layer3.expect = [ "{" "}" ];
};
extraConfig.console.keyMap = "neo";
extraConfig.services.xserver.layout = "de";
extraConfig.services.xserver.xkbVariant = "neo";
};

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, autoreconfHook,
{ lib, stdenv, fetchurl, nixosTests, autoreconfHook,
pkg-config, flex, check, pam, coreutils
}:
@ -42,6 +42,8 @@ stdenv.mkDerivation rec {
buildInputs = [ check pam ];
nativeBuildInputs = [ autoreconfHook pkg-config flex ];
passthru.tests = nixosTests.keymap;
meta = with lib; {
homepage = "https://kbd-project.org/";
description = "Linux keyboard tools and keyboard maps";