xterm: Add test

This commit is contained in:
Tim Steinbach 2020-11-16 22:13:13 -05:00
parent d2d6b5031c
commit 61e56265c2
No known key found for this signature in database
GPG Key ID: FD36A5EAAC49035A
2 changed files with 24 additions and 0 deletions

View File

@ -388,6 +388,7 @@ in
xmonad = handleTest ./xmonad.nix {};
xrdp = handleTest ./xrdp.nix {};
xss-lock = handleTest ./xss-lock.nix {};
xterm = handleTest ./xterm.nix {};
yabar = handleTest ./yabar.nix {};
yggdrasil = handleTest ./yggdrasil.nix {};
zfs = handleTest ./zfs.nix {};

23
nixos/tests/xterm.nix Normal file
View File

@ -0,0 +1,23 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "xterm";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};
machine = { pkgs, ... }:
{
imports = [ ./common/x11.nix ];
services.xserver.desktopManager.xterm.enable = false;
};
testScript =
''
machine.wait_for_x()
machine.succeed("DISPLAY=:0 xterm -title testterm -class testterm -fullscreen &")
machine.sleep(2)
machine.send_chars("echo $XTERM_VERSION >> /tmp/xterm_version\n")
machine.wait_for_file("/tmp/xterm_version")
assert "${pkgs.xterm.version}" in machine.succeed("cat /tmp/xterm_version")
machine.screenshot("window")
'';
})