Starting to add tool builder. Extracting bundler file computation.
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
equal = expected: actual:
|
||||
if actual == expected then
|
||||
(test.passed "= ${toString expected}") else
|
||||
(test.failed "'${toString actual}'(${builtins.typeOf actual}) != '${toString expected}'(${builtins.typeOf expected})");
|
||||
(test.failed (
|
||||
"expected '${toString expected}'(${builtins.typeOf expected})"
|
||||
+ " != "+
|
||||
"actual '${toString actual}'(${builtins.typeOf actual})"
|
||||
));
|
||||
|
||||
beASet = actual:
|
||||
if builtins.isAttrs actual then
|
||||
@@ -15,7 +19,7 @@
|
||||
(ex: builtins.any (ac: ex == ac) (builtins.attrNames actual))
|
||||
expected then
|
||||
(test.passed "has expected keys") else
|
||||
(test.failed "keys differ: expected [${lib.concatStringsSep ";" expected}] have [${lib.concatStringsSep ";" (builtins.attrNames actual)}]");
|
||||
(test.failed "keys differ: expected: [${lib.concatStringsSep ";" expected}] actual: [${lib.concatStringsSep ";" (builtins.attrNames actual)}]");
|
||||
|
||||
havePrefix = expected: actual:
|
||||
if lib.hasPrefix expected actual then
|
||||
|
||||
@@ -2,7 +2,7 @@ with builtins;
|
||||
let
|
||||
withIndexes = list: genList (idx: (elemAt list idx) // {index = idx;}) (length list);
|
||||
|
||||
testLine = report: "${okStr report} ${toString report.index} ${report.description}" + testDirective report + testYaml report;
|
||||
testLine = report: "${okStr report} ${toString (report.index + 1)} ${report.description}" + testDirective report + testYaml report;
|
||||
|
||||
testDirective = report: "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user