diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
12 files changed, 26 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.exp new file mode 100644 index 000000000000..08ef6079f899 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.exp @@ -0,0 +1 @@ +{ add = 37.34; div = 1.05714; mul = 105.154; sub = 14.35; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.nix new file mode 100644 index 000000000000..9d12aee061b2 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-float.nix @@ -0,0 +1,6 @@ +{ + add = 12.34 + 25.0; + sub = 20.05 - 5.7; + mul = 28.42 * 3.70; + div = 18.5 / 17.5; +} diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.exp new file mode 100644 index 000000000000..a5711e8bfe9b --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.exp @@ -0,0 +1 @@ +{ add = 20; div = 3; mul = 8; sub = 15; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.nix new file mode 100644 index 000000000000..c53790db099b --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-arithmetic-int.nix @@ -0,0 +1,6 @@ +{ + add = 15 + 5; + sub = 20 - 5; + mul = 4 * 2; + div = 9 / 3; +} diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.exp new file mode 100644 index 000000000000..9839e480b781 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.exp @@ -0,0 +1 @@ +"hello\nworld" diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.nix new file mode 100644 index 000000000000..84beb22ed5c3 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-multiline-string.nix @@ -0,0 +1,2 @@ +''hello +world'' diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.exp new file mode 100644 index 000000000000..b5c707cf462e --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.exp @@ -0,0 +1 @@ +{ a = { b = 15; }; b = { c = "test"; }; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.nix new file mode 100644 index 000000000000..5d611930ca7a --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-multiple-nested-attrs.nix @@ -0,0 +1 @@ +{ a.b = 15; b.c = "test"; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.exp new file mode 100644 index 000000000000..2483a2718301 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.exp @@ -0,0 +1 @@ +{ a = { b = 15; c = "test"; }; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.nix new file mode 100644 index 000000000000..4154ff9da29f --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-overlapping-nested-attrs.nix @@ -0,0 +1,4 @@ +{ + a.b = 15; + a.c = "test"; +} diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.exp new file mode 100644 index 000000000000..6db47b033efb --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.exp @@ -0,0 +1 @@ +{ a = { b = 42; }; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.nix new file mode 100644 index 000000000000..a97394d16523 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-nested-attrs.nix @@ -0,0 +1 @@ +{ a.b = 42; } |