diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-30T16·06+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-01-31T16·11+0000 |
commit | aa122cbae78ce97d60c0c98ba14df753d97e40b1 (patch) | |
tree | 12b98d85c4b18fe870feb26de70db9ba61837bd7 /nix/readTree/tests/default.nix | |
parent | 2d10d60fac0fd00a71b65cfdcb9fba0477b2086c (diff) |
style: format entire depot with nixpkgs-fmt r/3723
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'nix/readTree/tests/default.nix')
-rw-r--r-- | nix/readTree/tests/default.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nix/readTree/tests/default.nix b/nix/readTree/tests/default.nix index 3354a4fe5e75..fcca141714a8 100644 --- a/nix/readTree/tests/default.nix +++ b/nix/readTree/tests/default.nix @@ -10,13 +10,13 @@ let tree-ex = depot.nix.readTree { path = ./test-example; - args = {}; + args = { }; }; example = it "corresponds to the README example" [ (assertEq "third_party attrset" (lib.isAttrs tree-ex.third_party - && (! lib.isDerivation tree-ex.third_party)) + && (! lib.isDerivation tree-ex.third_party)) true) (assertEq "third_party attrset other attribute" tree-ex.third_party.favouriteColour @@ -37,7 +37,7 @@ let tree-tl = depot.nix.readTree { path = ./test-tree-traversal; - args = {}; + args = { }; }; traversal-logic = it "corresponds to the traversal logic in the README" [ @@ -82,7 +82,7 @@ let "Picked up through the drv") (assertEq "default.nix drv is not changed by readTree" tree-tl.default-nix.can-be-drv - (import ./test-tree-traversal/default-nix/can-be-drv/default.nix {})) + (import ./test-tree-traversal/default-nix/can-be-drv/default.nix { })) ]; # these each call readTree themselves because the throws have to happen inside assertThrows @@ -90,7 +90,7 @@ let (assertThrows "this file is not a function" (depot.nix.readTree { path = ./test-wrong-not-a-function; - args = {}; + args = { }; }).not-a-function) # can’t test for that, assertThrows can’t catch this error # (assertThrows "this file is a function but doesn’t have dots" @@ -99,12 +99,13 @@ let read-markers = depot.nix.readTree { path = ./test-marker; - args = {}; + args = { }; }; assertMarkerByPath = path: assertEq "${lib.concatStringsSep "." path} is marked correctly" - (lib.getAttrFromPath path read-markers).__readTree path; + (lib.getAttrFromPath path read-markers).__readTree + path; markers = it "marks nodes correctly" [ (assertMarkerByPath [ "directory-marked" ]) @@ -119,7 +120,8 @@ let read-markers.directory-marked.nested.__readTreeChildren [ ]) ]; -in runTestsuite "readTree" [ +in +runTestsuite "readTree" [ example traversal-logic wrong |