attr path parser: fix bug in not rejecting empty attr paths, add unparser
The following behaviour was previously present and has been fixed:
lix/lix2 » nix eval --expr '{x."" = 2;}' 'x.""'
{ "" = 2; }
lix/lix2 » nix eval --expr '{x."".y = 2;}' 'x."".y'
error: empty attribute name in selection path 'x."".y'
Change-Id: Iad21988f1191c33a3661c72a6b7f01a8b8b3e6eb
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "lix/libexpr/nixexpr.hh"
|
||||
#include "lix/libexpr/eval.hh"
|
||||
#include "lix/libexpr/eval-inline.hh"
|
||||
#include "lix/libstore/store-api.hh"
|
||||
|
||||
#include "tests/libstore.hh"
|
||||
|
||||
@@ -20,6 +19,10 @@ namespace nix {
|
||||
initLibExpr();
|
||||
}
|
||||
|
||||
EvalState & evalState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
protected:
|
||||
LibExprTest()
|
||||
: LibStoreTest()
|
||||
|
||||
Reference in New Issue
Block a user