mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
tests: Test neovim properly
This seems to work.
This commit is contained in:
parent
d1f759441a
commit
240cf74584
@ -1,4 +1,3 @@
|
||||
# TODO: Ensure that neovim config works without errors on startup
|
||||
let
|
||||
inherit (builtins) attrValues;
|
||||
in
|
||||
@ -12,7 +11,35 @@ in
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
output = machine.succeed("echo 'Hello world'")
|
||||
assert "Hello world" in output
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
machine.send_chars("user")
|
||||
machine.sleep(1)
|
||||
machine.send_key("ret")
|
||||
machine.sleep(1)
|
||||
machine.send_chars("user")
|
||||
machine.sleep(1)
|
||||
machine.send_key("ret")
|
||||
machine.sleep(5)
|
||||
|
||||
machine.send_chars("nvim hello.txt")
|
||||
machine.sleep(1)
|
||||
machine.send_key("ret")
|
||||
machine.sleep(5)
|
||||
|
||||
machine.send_chars("i")
|
||||
machine.sleep(1)
|
||||
machine.send_chars("Hello world")
|
||||
machine.sleep(1)
|
||||
machine.send_key("esc")
|
||||
machine.sleep(1)
|
||||
machine.send_chars(":wq")
|
||||
machine.sleep(1)
|
||||
machine.send_key("ret")
|
||||
machine.sleep(1)
|
||||
|
||||
text = machine.succeed("cat /home/user/hello.txt")
|
||||
|
||||
assert "Hello world" in text
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user