about summary refs log tree commit diff
path: root/tvix/eval/tests/nix_oracle.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2022-09-18T19·59-0400
committerclbot <clbot@tvl.fyi>2022-09-18T22·08+0000
commite720545e5b32683a3cdb135b6004a06304e025aa (patch)
tree33414930f82266722a53a184604a694448bd6a2b /tvix/eval/tests/nix_oracle.rs
parent6f70f325138b48f2c9b03a2103371663cb210d7c (diff)
refactor(tvix/eval): use Clap for arg+env parsing r/4911
Refactor the environment variable and argument parsing for the tvix repl
to use Clap instead of doing things ad-hoc, and thread through options
obtained from environment variables via explicit arguments rather than
obtaining them from the environment as they're needed. This makes adding
more flags more sustainable, and also makes the binary fully
self-documenting, including supported env vars, via `--help`.

Change-Id: Ib1f6a0cd20056e8c9196760ff755fa5729667760
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6653
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/tests/nix_oracle.rs')
-rw-r--r--tvix/eval/tests/nix_oracle.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/tests/nix_oracle.rs b/tvix/eval/tests/nix_oracle.rs
index 1091d6adf0ee..61f2be674e27 100644
--- a/tvix/eval/tests/nix_oracle.rs
+++ b/tvix/eval/tests/nix_oracle.rs
@@ -40,7 +40,9 @@ fn nix_eval(expr: &str) -> String {
 #[track_caller]
 fn compare_eval(expr: &str) {
     let nix_result = nix_eval(expr);
-    let tvix_result = tvix_eval::interpret(expr, None).unwrap().to_string();
+    let tvix_result = tvix_eval::interpret(expr, None, Default::default())
+        .unwrap()
+        .to_string();
 
     assert_eq!(nix_result.trim(), tvix_result);
 }