mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
parent
16cf246490
commit
04bc28c680
2 changed files with 34 additions and 36 deletions
|
@ -1319,7 +1319,7 @@ in {
|
||||||
zookeeper = handleTest ./zookeeper.nix {};
|
zookeeper = handleTest ./zookeeper.nix {};
|
||||||
zram-generator = handleTest ./zram-generator.nix {};
|
zram-generator = handleTest ./zram-generator.nix {};
|
||||||
zrepl = handleTest ./zrepl.nix {};
|
zrepl = handleTest ./zrepl.nix {};
|
||||||
zsh-history = handleTest ./zsh-history.nix {};
|
zsh-history = runTest ./zsh-history.nix;
|
||||||
zwave-js = runTest ./zwave-js.nix;
|
zwave-js = runTest ./zwave-js.nix;
|
||||||
zwave-js-ui = runTest ./zwave-js-ui.nix;
|
zwave-js-ui = runTest ./zwave-js-ui.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,38 @@
|
||||||
import ./make-test-python.nix (
|
{ pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
{
|
||||||
{
|
name = "zsh-history";
|
||||||
name = "zsh-history";
|
meta = with pkgs.lib.maintainers; {
|
||||||
meta = with pkgs.lib.maintainers; {
|
maintainers = [ ];
|
||||||
maintainers = [ ];
|
};
|
||||||
|
|
||||||
|
nodes.default =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ pkgs.zsh-history ];
|
||||||
|
programs.zsh.interactiveShellInit = ''
|
||||||
|
source ${pkgs.zsh-history.out}/share/zsh/init.zsh
|
||||||
|
'';
|
||||||
|
users.users.root.shell = "${pkgs.zsh}/bin/zsh";
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes.default =
|
testScript = ''
|
||||||
{ ... }:
|
start_all()
|
||||||
{
|
default.wait_for_unit("multi-user.target")
|
||||||
programs = {
|
default.wait_until_succeeds("pgrep -f 'agetty.*tty1'")
|
||||||
zsh.enable = true;
|
|
||||||
};
|
|
||||||
environment.systemPackages = [ pkgs.zsh-history ];
|
|
||||||
programs.zsh.interactiveShellInit = ''
|
|
||||||
source ${pkgs.zsh-history.out}/share/zsh/init.zsh
|
|
||||||
'';
|
|
||||||
users.users.root.shell = "${pkgs.zsh}/bin/zsh";
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript = ''
|
# Login
|
||||||
start_all()
|
default.wait_until_tty_matches("1", "login: ")
|
||||||
default.wait_for_unit("multi-user.target")
|
default.send_chars("root\n")
|
||||||
default.wait_until_succeeds("pgrep -f 'agetty.*tty1'")
|
default.wait_until_tty_matches("1", r"\nroot@default\b")
|
||||||
|
|
||||||
# Login
|
# Generate some history
|
||||||
default.wait_until_tty_matches("1", "login: ")
|
default.send_chars("echo foobar\n")
|
||||||
default.send_chars("root\n")
|
default.wait_until_tty_matches("1", "foobar")
|
||||||
default.wait_until_tty_matches("1", r"\nroot@default\b")
|
|
||||||
|
|
||||||
# Generate some history
|
# Ensure that command was recorded in history
|
||||||
default.send_chars("echo foobar\n")
|
default.succeed("/run/current-system/sw/bin/history list | grep -q foobar")
|
||||||
default.wait_until_tty_matches("1", "foobar")
|
'';
|
||||||
|
}
|
||||||
# Ensure that command was recorded in history
|
|
||||||
default.succeed("/run/current-system/sw/bin/history list | grep -q foobar")
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue