about summary refs log tree commit diff
path: root/tvix/eval/src/tests/mod.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-12T15·28+0300
committertazjin <tazjin@tvl.su>2022-08-28T11·02+0000
commit6fe5e2d75257504f0321e2e98b6fb675b716fe25 (patch)
treebf0549b862e8bdf25dda9e9b3aa05c16889b0ba5 /tvix/eval/src/tests/mod.rs
parent1f8aad0ab41eec3db2e892bf80b6b76d54d36bbc (diff)
feat(tvix/eval): resolve relative path literals r/4519
Resolves relative paths (e.g. `./foo`) either relative to the location
of the Nix file, or relative to the working directory if none is
supplied.

Change-Id: I70ec574657b221b458015117a004b6e4a9c25a30
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6185
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests/mod.rs')
-rw-r--r--tvix/eval/src/tests/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs
index ca8c114ba320..313498eeb777 100644
--- a/tvix/eval/src/tests/mod.rs
+++ b/tvix/eval/src/tests/mod.rs
@@ -11,7 +11,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).expect("evaluation of eval-okay test should succeed");
+    let result = interpret(&code, None).expect("evaluation of eval-okay test should succeed");
     let result_str = format!("{}", result);
 
     assert_eq!(
@@ -27,7 +27,7 @@ fn eval_okay_test(code_path: &str) {
 fn identity(code_path: &str) {
     let code = std::fs::read_to_string(code_path).expect("should be able to read test code");
 
-    let result = interpret(&code).expect("evaluation of identity test should succeed");
+    let result = interpret(&code, None).expect("evaluation of identity test should succeed");
     let result_str = format!("{}", result);
 
     assert_eq!(