From 6fe5e2d75257504f0321e2e98b6fb675b716fe25 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 12 Aug 2022 18:28:45 +0300 Subject: feat(tvix/eval): resolve relative path literals 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 --- tvix/eval/src/tests/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/eval/src/tests/mod.rs') 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!( -- cgit 1.4.1