92c53fe982
This adds scaffolding code for running the Nix language test suite. The majority of eval-okay-* tests should eventually be runnable as-is by Tvix, however the eval-fail-* tests might not as we intend to have more useful error messages than upstream Nix. Change-Id: I4f3227f0889c55e4274b804a3072850fb78dd1bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/6126 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi>
10 lines
231 B
Nix
10 lines
231 B
Nix
let {
|
|
as = { x = 123; y = 456; } // { z = 789; } // { z = 987; };
|
|
|
|
A = "a";
|
|
Z = "z";
|
|
|
|
body = if builtins.hasAttr A as
|
|
then builtins.getAttr A as
|
|
else assert builtins.hasAttr Z as; builtins.getAttr Z as;
|
|
}
|