mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* Implemented the primops necessary for generating the NixOS manual.
This commit is contained in:
parent
a353aef0b1
commit
fc92244ba8
8 changed files with 160 additions and 146 deletions
|
@ -16,7 +16,8 @@ void doTest(string s)
|
|||
Expr e = parseExprFromString(state, s, absPath("."));
|
||||
printMsg(lvlError, format(">>>>> %1%") % e);
|
||||
Value v;
|
||||
state.strictEval(e, v);
|
||||
state.eval(e, v);
|
||||
state.strictForceValue(v);
|
||||
printMsg(lvlError, format("result: %1%") % v);
|
||||
}
|
||||
|
||||
|
@ -76,6 +77,8 @@ void run(Strings args)
|
|||
doTest("let x = 1; as = rec { inherit x; y = as.x; }; in as.y");
|
||||
doTest("let as = { x = 1; }; bs = rec { inherit (as) x; y = x; }; in bs.y");
|
||||
doTest("let as = rec { inherit (y) x; y = { x = 1; }; }; in as.x");
|
||||
doTest("builtins.toXML 123");
|
||||
doTest("builtins.toXML { a.b = \"x\" + \"y\"; c = [ 1 2 ] ++ [ 3 4 ]; }");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue