snix/tvix/eval/src/tests/tvix_tests
Vincent Ambo 75ba7c0120 test(tvix/eval): add basic tests for with expressions
Change-Id: I94664090e7a2b060dfbe21c1eeb859fb31e417b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6225
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-31 22:42:48 +00:00
..
eval-okay-arithmetic-float.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-arithmetic-float.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-arithmetic-int.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-arithmetic-int.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-attrs-inherit-literal.exp feat(tvix/eval): implement inherit in attribute set literals 2022-08-31 22:10:40 +00:00
eval-okay-attrs-inherit-literal.nix feat(tvix/eval): implement inherit in attribute set literals 2022-08-31 22:10:40 +00:00
eval-okay-attrs-inherit.exp feat(tvix/eval): implement inherit in attribute set literals 2022-08-31 22:10:40 +00:00
eval-okay-attrs-inherit.nix feat(tvix/eval): implement inherit in attribute set literals 2022-08-31 22:10:40 +00:00
eval-okay-attrs-simple-inherit.exp feat(tvix/eval): Implement inherit from outer scope in attrs 2022-08-30 17:13:27 +00:00
eval-okay-attrs-simple-inherit.nix feat(tvix/eval): Implement inherit from outer scope in attrs 2022-08-30 17:13:27 +00:00
eval-okay-attrs-update-empty-lhs.exp feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update-empty-lhs.nix feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update-empty-rhs.exp feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update-empty-rhs.nix feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update-kv-lhs.exp feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update-kv-lhs.nix feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update.exp feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-attrs-update.nix feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
eval-okay-cmp-float-false.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-float-false.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-float-true.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-float-true.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-int-false.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-int-false.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-int-true.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-int-true.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-num-false.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-num-false.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-num-true.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-num-true.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-str-false.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-str-false.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-str-true.exp feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-cmp-str-true.nix feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval-okay-concat-lists.exp feat(tvix/eval): implement list concatenation 2022-08-25 12:07:30 +00:00
eval-okay-concat-lists.nix feat(tvix/eval): implement list concatenation 2022-08-25 12:07:30 +00:00
eval-okay-concat-strings.exp feat(tvix/eval): implement string concatenation 2022-08-25 11:11:27 +00:00
eval-okay-concat-strings.nix feat(tvix/eval): implement string concatenation 2022-08-25 11:11:27 +00:00
eval-okay-contains-nested-non-set.exp fix(tvix/eval): ? operator should use OpAttrsOrNotFound 2022-08-30 17:13:27 +00:00
eval-okay-contains-nested-non-set.nix fix(tvix/eval): ? operator should use OpAttrsOrNotFound 2022-08-30 17:13:27 +00:00
eval-okay-contains-non-set.exp fix(tvix/eval): allow use of ? operator on non-set types 2022-08-30 17:13:27 +00:00
eval-okay-contains-non-set.nix fix(tvix/eval): allow use of ? operator on non-set types 2022-08-30 17:13:27 +00:00
eval-okay-deeply-nested-attrs.exp fix(tvix/eval): emit correct count in OpAttrPath 2022-08-30 17:13:27 +00:00
eval-okay-deeply-nested-attrs.nix fix(tvix/eval): emit correct count in OpAttrPath 2022-08-30 17:13:27 +00:00
eval-okay-eq-float.exp feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-eq-float.nix feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-eq-int.exp feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-eq-int.nix feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-let-identifiers.exp test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-let-identifiers.nix test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-let-inherit.exp feat(tvix/eval): implement inherit in let expressions 2022-08-31 22:10:40 +00:00
eval-okay-let-inherit.nix feat(tvix/eval): implement inherit in let expressions 2022-08-31 22:10:40 +00:00
eval-okay-let-sibling-access.exp test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-let-sibling-access.nix test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-multiline-string.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-multiline-string.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-multiple-nested-attrs.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-multiple-nested-attrs.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-ne-int.exp feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-ne-int.nix feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-ne-string.exp feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-ne-string.nix feat(tvix): implement not-equals (!=) operator 2022-08-25 11:34:00 +00:00
eval-okay-nested-with.exp test(tvix/eval): add basic tests for with expressions 2022-08-31 22:42:48 +00:00
eval-okay-nested-with.nix test(tvix/eval): add basic tests for with expressions 2022-08-31 22:42:48 +00:00
eval-okay-or-operator-default.exp test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-default.nix test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-nested-default.exp test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-nested-default.nix test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-nested.exp test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-nested.nix test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator-non-set.exp fix(tvix/eval): or should handle non-attrset values, too 2022-08-30 17:13:27 +00:00
eval-okay-or-operator-non-set.nix fix(tvix/eval): or should handle non-attrset values, too 2022-08-30 17:13:27 +00:00
eval-okay-or-operator.exp test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-or-operator.nix test(tvix/eval): add tests for the attrset or operator 2022-08-26 16:05:09 +00:00
eval-okay-overlapping-nested-attrs.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-overlapping-nested-attrs.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-simple-interpol.exp feat(tvix/eval): implement string concatenation 2022-08-25 11:11:27 +00:00
eval-okay-simple-interpol.nix feat(tvix/eval): implement string concatenation 2022-08-25 11:11:27 +00:00
eval-okay-simple-let.exp test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-simple-let.nix test(tvix/eval): add basic tests for let expressions 2022-08-29 20:13:26 +00:00
eval-okay-simple-nested-attrs.exp test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-simple-nested-attrs.nix test(tvix/eval): add some eval-okay-* tests for trivial types 2022-08-25 11:07:16 +00:00
eval-okay-simple-with.exp test(tvix/eval): add basic tests for with expressions 2022-08-31 22:42:48 +00:00
eval-okay-simple-with.nix test(tvix/eval): add basic tests for with expressions 2022-08-31 22:42:48 +00:00
identity-bool-false.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-bool-true.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-empty-attrs.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-empty-list.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-flat-attrs.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-float.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-heterogeneous-list.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-homogeneous-float-list.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-homogeneous-int-list.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-homogeneous-string-list.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-int.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-kv-attrs.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-nested-attrs.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-null.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-signed-float.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-signed-int.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
identity-string.nix test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00
README.md test(tvix/eval): add identity tests for literal evaluation 2022-08-24 23:11:12 +00:00

These tests are "native" to Tvix and exist in addition to the Nix test suite.

All of these are straightforward code snippets which are expected to produce a certain result.

identity-* tests

Files named identity-*.nix contain code that is supposed to produce itself exactly after evaluation.

These are useful for testing literals.

eval-okay-* tests

Files named eval-okay-*.nix contain code which is supposed to evaluate to the output in the corresponding eval-okay-*.exp file.

This convention is taken from the original Nix test suite.