diff options
author | Silvan Mosberger <contact@infinisil.com> | 2021-12-16 19:59:13 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2021-12-16 19:59:13 +0100 |
commit | d9fbe3e20860be305c9d42945b4d0ef73067007e (patch) | |
tree | 0f83e7171de489dfa273ce69b902a1bf30a15365 /tests | |
parent | 7caf9f33f5454cc2a6ac240fa4ca73573c148461 (diff) |
Add a test case for builtins.groupBy
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lang/eval-okay-groupBy.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-groupBy.nix | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-groupBy.exp b/tests/lang/eval-okay-groupBy.exp new file mode 100644 index 000000000..bfca5652a --- /dev/null +++ b/tests/lang/eval-okay-groupBy.exp @@ -0,0 +1 @@ +{ "1" = [ 9 ]; "2" = [ 8 ]; "3" = [ 13 29 ]; "4" = [ 3 4 10 11 17 18 ]; "5" = [ 0 23 26 28 ]; "6" = [ 1 12 21 27 30 ]; "7" = [ 7 22 ]; "8" = [ 14 ]; "9" = [ 19 ]; b = [ 16 25 ]; c = [ 24 ]; d = [ 2 ]; e = [ 5 6 15 31 ]; f = [ 20 ]; } diff --git a/tests/lang/eval-okay-groupBy.nix b/tests/lang/eval-okay-groupBy.nix new file mode 100644 index 000000000..862d89dbd --- /dev/null +++ b/tests/lang/eval-okay-groupBy.nix @@ -0,0 +1,5 @@ +with import ./lib.nix; + +builtins.groupBy (n: + builtins.substring 0 1 (builtins.hashString "sha256" (toString n)) +) (range 0 31) |