diff --git a/test/units/testsuite-73.sh b/test/units/testsuite-73.sh index 4f33cab848..2aef7c779a 100755 --- a/test/units/testsuite-73.sh +++ b/test/units/testsuite-73.sh @@ -552,6 +552,102 @@ test_convert() { assert_not_in "X11 Options:" "$output" } +test_validate() { + if [[ -z "$(localectl list-keymaps)" ]]; then + echo "No vconsole keymap installed, skipping test." + return + fi + + if [[ -z "$(localectl list-x11-keymap-layouts)" ]]; then + echo "No x11 keymap installed, skipping test." + return + fi + + backup_keymap + trap restore_keymap RETURN + + # clear previous settings + systemctl stop systemd-localed.service + wait_vconsole_setup + rm -f /etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard + + # create invalid configs + cat >/etc/vconsole.conf </etc/vconsole.conf </etc/vconsole.conf </failed enable_debug @@ -559,6 +655,7 @@ test_locale test_vc_keymap test_x11_keymap test_convert +test_validate touch /testok rm /failed