test(tvix/eval): add a test case for groupBy with thunks
We have to be careful implementing `builtins.groupBy`, since the list may contain thunks, and tvix's to_xxx() functions do not work on thunks. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I182b6fc2d4296f864ed16744ef70b153e8e6978a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7039 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
4ec43bed5e
commit
9c7d8e791a
3 changed files with 9 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
{ fred = [ { x = "fred"; y = "fred"; } ]; }
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
builtins.groupBy
|
||||
(v: v.x)
|
||||
[ (rec { y = x; x = "fred"; }) ]
|
||||
|
||||
|
|
@ -56,6 +56,8 @@ let
|
|||
"eval-okay-compare-lists.nix" = [ nix ];
|
||||
# getAttrPos gains support for functionArgs-returned sets after 2.3
|
||||
"eval-okay-getattrpos-functionargs.nix" = [ nix ];
|
||||
# groupBy appeared (long) after 2.3
|
||||
"eval-okay-builtins-groupby-thunk.nix" = [ nix ];
|
||||
};
|
||||
|
||||
runCppNixLangTests = cpp-nix:
|
||||
|
|
Loading…
Reference in a new issue