mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 14:19:58 +03:00
changelog-d: Move out tests.basic
This commit is contained in:
parent
9009c53c97
commit
3ce9db808b
@ -1,9 +1,9 @@
|
||||
{
|
||||
cabal2nix,
|
||||
callPackage,
|
||||
lib,
|
||||
haskell,
|
||||
haskellPackages,
|
||||
runCommand,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
@ -27,29 +27,7 @@ let
|
||||
'';
|
||||
});
|
||||
passthru.tests = {
|
||||
basic = runCommand "changelog-d-basic-test" {
|
||||
nativeBuildInputs = [ finalAttrs.finalPackage ];
|
||||
} ''
|
||||
mkdir changelogs
|
||||
cat > changelogs/config <<EOF
|
||||
organization: NixOS
|
||||
repository: boondoggle
|
||||
EOF
|
||||
cat > changelogs/a <<EOF
|
||||
synopsis: Support numbers with incrementing base-10 digits
|
||||
issues: #1234
|
||||
description: {
|
||||
This didn't work before.
|
||||
}
|
||||
EOF
|
||||
changelog-d changelogs >$out
|
||||
cat -n $out
|
||||
echo Checking the generated output
|
||||
set -x
|
||||
grep -F 'Support numbers with incrementing base-10 digits' $out >/dev/null
|
||||
grep -F 'https://github.com/NixOS/boondoggle/issues/1234' $out >/dev/null
|
||||
set +x
|
||||
'';
|
||||
basic = callPackage ./tests/basic.nix { changelog-d = finalAttrs.finalPackage; };
|
||||
};
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
|
25
pkgs/by-name/ch/changelog-d/tests/basic.nix
Normal file
25
pkgs/by-name/ch/changelog-d/tests/basic.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ runCommand, changelog-d }:
|
||||
|
||||
runCommand "changelog-d-basic-test" {
|
||||
nativeBuildInputs = [ changelog-d ];
|
||||
} ''
|
||||
mkdir changelogs
|
||||
cat > changelogs/config <<EOF
|
||||
organization: NixOS
|
||||
repository: boondoggle
|
||||
EOF
|
||||
cat > changelogs/a <<EOF
|
||||
synopsis: Support numbers with incrementing base-10 digits
|
||||
issues: #1234
|
||||
description: {
|
||||
This didn't work before.
|
||||
}
|
||||
EOF
|
||||
changelog-d changelogs >$out
|
||||
cat -n $out
|
||||
echo Checking the generated output
|
||||
set -x
|
||||
grep -F 'Support numbers with incrementing base-10 digits' $out >/dev/null
|
||||
grep -F 'https://github.com/NixOS/boondoggle/issues/1234' $out >/dev/null
|
||||
set +x
|
||||
''
|
Loading…
Reference in New Issue
Block a user