at 23.05-pre 993 B view raw
1import ./make-test-python.nix ({ ... }: 2 3{ 4 name = "libinput"; 5 6 nodes.machine = { ... }: 7 { 8 imports = [ 9 ./common/x11.nix 10 ./common/user-account.nix 11 ]; 12 13 test-support.displayManager.auto.user = "alice"; 14 15 services.xserver.libinput = { 16 enable = true; 17 mouse = { 18 naturalScrolling = true; 19 leftHanded = true; 20 middleEmulation = false; 21 horizontalScrolling = false; 22 }; 23 }; 24 }; 25 26 testScript = '' 27 def expect_xserver_option(option, value): 28 machine.succeed(f"""cat /var/log/X.0.log | grep -F 'Option "{option}" "{value}"'""") 29 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 ''; 38})