diff options
Diffstat (limited to 'tvix/eval/src/tests')
-rw-r--r-- | tvix/eval/src/tests/mod.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/directory/default.nix | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-import.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-import.nix | 4 |
4 files changed, 7 insertions, 1 deletions
diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs index 49ca35973e56..8540a5641bcf 100644 --- a/tvix/eval/src/tests/mod.rs +++ b/tvix/eval/src/tests/mod.rs @@ -12,7 +12,7 @@ fn eval_okay_test(code_path: &str) { let code = std::fs::read_to_string(code_path).expect("should be able to read test code"); let exp = std::fs::read_to_string(exp_path).expect("should be able to read test expectation"); - let result = interpret(&code, None, Default::default()) + let result = interpret(&code, Some(code_path.into()), Default::default()) .expect("evaluation of eval-okay test should succeed"); let result_str = format!("{}", result); diff --git a/tvix/eval/src/tests/tvix_tests/directory/default.nix b/tvix/eval/src/tests/tvix_tests/directory/default.nix new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/directory/default.nix @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-import.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-import.exp new file mode 100644 index 000000000000..5ba7f64d78a7 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-import.exp @@ -0,0 +1 @@ +[ 42 42 ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-import.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-import.nix new file mode 100644 index 000000000000..49cd244f06c1 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-import.nix @@ -0,0 +1,4 @@ +[ + (import ./directory) + (import ./directory/default.nix) +] |