Skip to content

Commit 3ce9db8

Browse files
committed
changelog-d: Move out tests.basic
1 parent 9009c53 commit 3ce9db8

2 files changed

Lines changed: 27 additions & 24 deletions

File tree

pkgs/by-name/ch/changelog-d/package.nix

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
cabal2nix,
3+
callPackage,
34
lib,
45
haskell,
56
haskellPackages,
6-
runCommand,
77
writeShellApplication,
88
}:
99

@@ -27,29 +27,7 @@ let
2727
'';
2828
});
2929
passthru.tests = {
30-
basic = runCommand "changelog-d-basic-test" {
31-
nativeBuildInputs = [ finalAttrs.finalPackage ];
32-
} ''
33-
mkdir changelogs
34-
cat > changelogs/config <<EOF
35-
organization: NixOS
36-
repository: boondoggle
37-
EOF
38-
cat > changelogs/a <<EOF
39-
synopsis: Support numbers with incrementing base-10 digits
40-
issues: #1234
41-
description: {
42-
This didn't work before.
43-
}
44-
EOF
45-
changelog-d changelogs >$out
46-
cat -n $out
47-
echo Checking the generated output
48-
set -x
49-
grep -F 'Support numbers with incrementing base-10 digits' $out >/dev/null
50-
grep -F 'https://github.com/NixOS/boondoggle/issues/1234' $out >/dev/null
51-
set +x
52-
'';
30+
basic = callPackage ./tests/basic.nix { changelog-d = finalAttrs.finalPackage; };
5331
};
5432

5533
meta = oldAttrs.meta // {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{ runCommand, changelog-d }:
2+
3+
runCommand "changelog-d-basic-test" {
4+
nativeBuildInputs = [ changelog-d ];
5+
} ''
6+
mkdir changelogs
7+
cat > changelogs/config <<EOF
8+
organization: NixOS
9+
repository: boondoggle
10+
EOF
11+
cat > changelogs/a <<EOF
12+
synopsis: Support numbers with incrementing base-10 digits
13+
issues: #1234
14+
description: {
15+
This didn't work before.
16+
}
17+
EOF
18+
changelog-d changelogs >$out
19+
cat -n $out
20+
echo Checking the generated output
21+
set -x
22+
grep -F 'Support numbers with incrementing base-10 digits' $out >/dev/null
23+
grep -F 'https://github.com/NixOS/boondoggle/issues/1234' $out >/dev/null
24+
set +x
25+
''

0 commit comments

Comments
 (0)