at 25.11-pre 1.1 kB view raw
1import ./make-test-python.nix ( 2 { ... }: 3 4 { 5 name = "libinput"; 6 7 nodes.machine = 8 { ... }: 9 { 10 imports = [ 11 ./common/x11.nix 12 ./common/user-account.nix 13 ]; 14 15 test-support.displayManager.auto.user = "alice"; 16 17 services.libinput = { 18 enable = true; 19 mouse = { 20 naturalScrolling = true; 21 leftHanded = true; 22 middleEmulation = false; 23 horizontalScrolling = false; 24 }; 25 }; 26 }; 27 28 testScript = '' 29 def expect_xserver_option(option, value): 30 machine.succeed(f"""cat /var/log/X.0.log | grep -F 'Option "{option}" "{value}"'""") 31 32 machine.start() 33 machine.wait_for_x() 34 machine.succeed("""cat /var/log/X.0.log | grep -F "Using input driver 'libinput'" """) 35 expect_xserver_option("NaturalScrolling", "on") 36 expect_xserver_option("LeftHanded", "on") 37 expect_xserver_option("MiddleEmulation", "off") 38 expect_xserver_option("HorizontalScrolling", "off") 39 ''; 40 } 41)