summary refs log tree commit diff
path: root/nixos/tests/fish.nix
diff options
context:
space:
mode:
authorhyperfekt <git@hyperfekt.net>2018-12-17 20:12:09 +0100
committerhyperfekt <git@hyperfekt.net>2019-02-27 12:23:48 +0100
commit3731835efce7c7f746270c01efe4f91bf127be25 (patch)
treec4a8323b433dae5a42ef5fce9f6f63139b3401ee /nixos/tests/fish.nix
parent2e23d727d640f0a96b167d105157f6e7183d8f82 (diff)
downloadnixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar.gz
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar.bz2
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar.lz
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar.xz
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.tar.zst
nixpkgs-3731835efce7c7f746270c01efe4f91bf127be25.zip
nixos/fish: generate autocompletions from man pages
Diffstat (limited to 'nixos/tests/fish.nix')
-rw-r--r--nixos/tests/fish.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/tests/fish.nix b/nixos/tests/fish.nix
new file mode 100644
index 00000000000..97c4e8e37ac
--- /dev/null
+++ b/nixos/tests/fish.nix
@@ -0,0 +1,21 @@
+import ./make-test.nix ({ pkgs, ... }: {
+  name = "fish";
+
+  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
+      ];
+    };
+
+  testScript =
+    ''
+      $machine->waitForFile("/etc/fish/generated_completions/coreutils.fish");
+      $machine->waitForFile("/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\$'");
+    '';
+})