From 08399c719a67b92ef2ff6afcffc960fd35ae5f99 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 10 Sep 2024 11:30:16 +0300 Subject: fix(emery/nix-actor): remove import tests Cannot reliably import from $NIX_PATH or a path constant. Change-Id: Ic9c3a8d4cd9e22ae1ae6d3955d10905afe391efd --- users/emery/nix-actor/tests/test.nim | 49 ------------------------------------ 1 file changed, 49 deletions(-) diff --git a/users/emery/nix-actor/tests/test.nim b/users/emery/nix-actor/tests/test.nim index 5e5fe23f5bac..2041e76f1738 100644 --- a/users/emery/nix-actor/tests/test.nim +++ b/users/emery/nix-actor/tests/test.nim @@ -52,14 +52,6 @@ suite "libexpr": test s: checkConversion(s) - test "derivation": - let samples = [ - "let depot = import /depot { }; in depot.users.emery.pkgs.syndicate-server" - ] - for s in samples: - test s: - checkConversion(s) - test "large": let samples = "builtins.listToAttrs (builtins.genList (x: { name = toString x; value = null; }) 99)" @@ -100,44 +92,3 @@ suite "eval": eval.close() store.close() - -suite "import": - let - store = openStore() - eval = store.newState() - - block: - ## full expression string - let f = eval.evalFromString("false") - let t = eval.evalFromString("true") - let fs = $f.toPreserves(eval) - let ts = $t.toPreserves(eval) - checkpoint "false:", fs - check fs == "#f", fs - check ts == "#t", ts - - block: - ## full expression string - let fn = eval.evalFromString("x: x") - let x = eval.evalFromString("let pkgs = import /home/repo/nixpkgs {}; in pkgs.ncdc.meta.homepage") - eval.force(x) - let y = eval.apply(fn, x) - let pr = $y.toPreserves(eval).unthunkAll - checkpoint "$y.toPreserves(eval):", pr - check pr == """"https://dev.yorhel.nl/ncdc"""" - - block: - ## function - let pre = eval.evalFromString("import /home/repo/nixpkgs") - let args = eval.evalFromString("{ }") - let pkgs = eval.apply(pre, args) - let fn = eval.evalFromString("""pkgs: pkgs.ncdc.meta.homepage""") - let res = eval.apply(fn, pkgs) - let pr = res.toPreserves(eval).unthunkAll - assert not pr.isEmbedded - let text = $pr - checkpoint text - check text == """"https://dev.yorhel.nl/ncdc"""" - - eval.close() - store.close() -- cgit 1.4.1