depot/third_party/nixpkgs/nixos/tests/fish.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

26 lines
835 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "fish";
nodes.machine =
{ pkgs, ... }:
{
programs.fish.enable = true;
environment.systemPackages = with pkgs; [
coreutils
procps # kill collides with coreutils' to test https://github.com/NixOS/nixpkgs/issues/56432
];
# TODO: remove if/when #267880 is merged and this is a default
services.logrotate.enable = false;
};
testScript =
''
start_all()
machine.wait_for_file("/etc/fish/generated_completions/coreutils.fish")
machine.wait_for_file("/etc/fish/generated_completions/kill.fish")
machine.succeed(
"fish -ic 'echo $fish_complete_path' | grep -q '/share/fish/completions /etc/fish/generated_completions /root/.local/share/fish/generated_completions$'"
)
'';
})