Fix assert fail on non-object import metadata (fix #900)

This commit is contained in:
David Tolnay committed 2015-08-13 21:42:35 -07:00
1 parent a5b2c55a70
commit 5479d7f2dc
5 files changed
+1014 -1069

No files matched your search

+8
View File
@@ -1181,6 +1181,14 @@ include "c"; [a, c]
null
[0,"acmehbah"]
%%FAIL
include "a" (.+1); 0
jq: error: Module metadata must be constant at <top-level>, line 1:
%%FAIL
include "a" []; 0
jq: error: Module metadata must be an object at <top-level>, line 1:
modulemeta
"c"
{"whatever":null,"deps":[{"as":"foo","is_data":false,"relpath":"a"},{"search":"./","as":"d","is_data":false,"relpath":"d"},{"search":"./","as":"d2","is_data":false,"relpath":"d"},{"search":"./../lib/jq","as":"e","is_data":false,"relpath":"e"},{"search":"./../lib/jq","as":"f","is_data":false,"relpath":"f"},{"as":"d","is_data":true,"relpath":"data"}]}