feat(tvix/eval): Support builtins.hasAttr
See unit tests for examples :) Change-Id: Ieec51d780a7762cc455ca03a9dc1648a0711924a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6553 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
5b165e7318
commit
059f4b964f
3 changed files with 16 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
[ true true true false false true false ]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
(builtins.hasAttr "foo" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.hasAttr "bar" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.hasAttr "baz" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.hasAttr "FOO" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.hasAttr "foo" {})
|
||||
(builtins.hasAttr ("f" + "o" + "o") { foo = 1; })
|
||||
(builtins.hasAttr ("b" + "a" + "r") { foo = 1; })
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue