depot/third_party/nixpkgs/pkgs/by-name/in/installShellFiles/tests/install-completion-output.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

27 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
''