python3Packages.xknx: 1.1.0 -> 1.2.0
[NixPkgs.git] / nixos / tests / libinput.nix
blob9b6fa159b999c60186338571c09a5ad9d2fd87ef
1 import ./make-test-python.nix ({ ... }:
4   name = "libinput";
6   nodes.machine = { ... }:
7     {
8       imports = [
9         ./common/x11.nix
10         ./common/user-account.nix
11       ];
13       test-support.displayManager.auto.user = "alice";
15       services.xserver.libinput = {
16         enable = true;
17         mouse = {
18           naturalScrolling = true;
19           leftHanded = true;
20           middleEmulation = false;
21           horizontalScrolling = false;
22         };
23       };
24     };
26   testScript = ''
27     def expect_xserver_option(option, value):
28         machine.succeed(f"""cat /var/log/X.0.log | grep -F 'Option "{option}" "{value}"'""")
30     machine.start()
31     machine.wait_for_x()
32     machine.succeed("""cat /var/log/X.0.log | grep -F "Using input driver 'libinput'" """)
33     expect_xserver_option("NaturalScrolling", "on")
34     expect_xserver_option("LeftHanded", "on")
35     expect_xserver_option("MiddleEmulation", "off")
36     expect_xserver_option("HorizontalScrolling", "off")
37   '';