test(tvix/eval): add basic tests for let expressions
Change-Id: I788504f0c1848a1422c99006bf659738df614716 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6191 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
52f4915317
commit
36748fe4f6
6 changed files with 17 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
[ 1 2 3 ]
|
|
@ -0,0 +1,5 @@
|
|||
let
|
||||
a = 1;
|
||||
"b" = 2;
|
||||
${"c"} = 3;
|
||||
in [ a b c ]
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,5 @@
|
|||
let
|
||||
a = 1;
|
||||
b = 2;
|
||||
c = a + b;
|
||||
in c
|
1
tvix/eval/src/tests/tvix_tests/eval-okay-simple-let.exp
Normal file
1
tvix/eval/src/tests/tvix_tests/eval-okay-simple-let.exp
Normal file
|
@ -0,0 +1 @@
|
|||
3
|
4
tvix/eval/src/tests/tvix_tests/eval-okay-simple-let.nix
Normal file
4
tvix/eval/src/tests/tvix_tests/eval-okay-simple-let.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
let
|
||||
a = 1;
|
||||
b = 2;
|
||||
in a + b
|
Loading…
Reference in a new issue