evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / in / installShellFiles / tests / install-manpage-outputs.nix
blob4e249a9e5061ba0289ba3b00187ad2be02bd623e
2   lib,
3   installShellFiles,
4   runCommandLocal,
5 }:
7 runCommandLocal "install-shell-files--install-manpage-outputs"
8   {
9     outputs = [
10       "out"
11       "man"
12       "devman"
13     ];
14     nativeBuildInputs = [ installShellFiles ];
15     meta.platforms = lib.platforms.all;
16   }
17   ''
18     mkdir -p doc
19     echo foo > doc/foo.1
20     echo bar > doc/bar.3
22     installManPage doc/*
24     # assert they didn't go into $out
25     [[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]]
27     # foo.1 alone went into man
28     cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1
29     [[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]]
31     # bar.3 alone went into devman
32     cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3
33     [[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]]
35     touch $out
36   ''