mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
Restructure cleanCargoToml tests
This commit is contained in:
parent
8d6d973261
commit
6b9ebe7220
@ -3,13 +3,15 @@
|
||||
, writeTOML
|
||||
}:
|
||||
|
||||
path:
|
||||
let
|
||||
cleaned = cleanCargoToml {
|
||||
cargoToml = ./Cargo.toml;
|
||||
cargoToml = path + /Cargo.toml;
|
||||
};
|
||||
cleanedToml = writeTOML "cleaned.toml" cleaned;
|
||||
expected = path + /expected.toml;
|
||||
in
|
||||
runCommand "compare" { } ''
|
||||
diff ${./expected.toml} ${cleanedToml}
|
||||
diff ${expected} ${cleanedToml}
|
||||
touch $out
|
||||
''
|
@ -1,15 +0,0 @@
|
||||
{ cleanCargoToml
|
||||
, runCommand
|
||||
, writeTOML
|
||||
}:
|
||||
|
||||
let
|
||||
cleaned = cleanCargoToml {
|
||||
cargoToml = ./Cargo.toml;
|
||||
};
|
||||
cleanedToml = writeTOML "cleaned.toml" cleaned;
|
||||
in
|
||||
runCommand "compare" { } ''
|
||||
diff ${./expected.toml} ${cleanedToml}
|
||||
touch $out
|
||||
''
|
@ -12,8 +12,9 @@ pkgs.lib.makeScope myLib.newScope (self:
|
||||
callPackage = self.newScope { };
|
||||
in
|
||||
{
|
||||
cleanCargoTomlSimple = callPackage ./cleanCargoToml/simple { };
|
||||
cleanCargoTomlComplex = callPackage ./cleanCargoToml/complex { };
|
||||
cmpCleanCargoToml = callPackage ./cleanCargoToml { };
|
||||
cmpCleanCargoTomlSimple = self.cmpCleanCargoToml ./cleanCargoToml/barebones;
|
||||
cmpCleanCargoTomlComplex = self.cmpCleanCargoToml ./cleanCargoToml/complex;
|
||||
|
||||
compilesFresh = callPackage ./compilesFresh.nix { };
|
||||
compilesFreshSimple = self.compilesFresh ./simple "simple";
|
||||
|
Loading…
Reference in New Issue
Block a user