nixpkgs/pkgs/by-name/in/installShellFiles/tests/install-completion-output.nix
Anderson Torres 98e9fbb530 installShellFiles: dismember tests into their own files
It makes the maintenance and creation of tests more intuitive: just throw a Nix
package under tests!
2024-08-28 18:51:06 -03:00

28 lines
508 B
Nix

{
lib,
installShellFiles,
runCommandLocal,
}:
runCommandLocal "install-shell-files--install-completion-output"
{
outputs = [
"out"
"bin"
];
nativeBuildInputs = [ installShellFiles ];
meta.platforms = lib.platforms.all;
}
''
echo foo > foo
installShellCompletion --bash foo
# assert it didn't go into $out
[[ ! -f $out/share/bash-completion/completions/foo ]]
cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo
touch $out
''