1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* Make `import' work.

This commit is contained in:
Eelco Dolstra 2010-03-30 09:22:33 +00:00
parent 31428c3a06
commit d78a05ab40
4 changed files with 141 additions and 62 deletions

View file

@ -13,7 +13,7 @@ using namespace nix;
void doTest(string s)
{
EvalState state;
Expr e = parseExprFromString(state, s, "/");
Expr e = parseExprFromString(state, s, absPath("."));
printMsg(lvlError, format(">>>>> %1%") % e);
Value v;
state.strictEval(e, v);
@ -66,6 +66,8 @@ void run(Strings args)
doTest("if false then 1 else 2");
doTest("if false || true then 1 else 2");
doTest("let x = x; in if true || x then 1 else 2");
doTest("/etc/passwd");
doTest("import ./foo.nix");
}