nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, testers }:
2lib.recurseIntoAttrs {
3 # Positive tests
4 indent2 = testers.shfmt {
5 name = "indent2";
6 indent = 2;
7 src = ./src/indent2.sh;
8 };
9 indent2Bin = testers.shfmt {
10 name = "indent2Bin";
11 indent = 2;
12 src = ./src;
13 };
14 # Negative tests
15 indent2With0 = testers.testBuildFailure' {
16 drv = testers.shfmt {
17 name = "indent2";
18 indent = 0;
19 src = ./src/indent2.sh;
20 };
21 };
22 indent2BinWith0 = testers.testBuildFailure' {
23 drv = testers.shfmt {
24 name = "indent2Bin";
25 indent = 0;
26 src = ./src;
27 };
28 };
29 indent2With4 = testers.testBuildFailure' {
30 drv = testers.shfmt {
31 name = "indent2";
32 indent = 4;
33 src = ./src/indent2.sh;
34 };
35 };
36 indent2BinWith4 = testers.testBuildFailure' {
37 drv = testers.shfmt {
38 name = "indent2Bin";
39 indent = 4;
40 src = ./src;
41 };
42 };
43}