Files
stedolan-jq/tests/modules/c/c.jq
T

17 lines
689 B
Plaintext
Raw Normal View History

2014-12-30 13:13:30 -06:00
module {whatever:null};
import "a" as foo;
import "d" as d {search:"./"};
import "d" as d2{search:"./"};
import "e" as e {search:"./../lib/jq"};
import "f" as f {search:"./../lib/jq"};
import "data" as $d;
def a: 0;
2014-11-24 17:58:34 -06:00
def c:
2014-12-30 13:13:30 -06:00
if $d::d[0] != {this:"is a test",that:"is too"} then error("data import is busted")
elif d2::meh != d::meh then error("import twice doesn't work")
2014-11-24 17:58:34 -06:00
elif foo::a != "a" then error("foo::a didn't work as expected")
elif d::meh != "meh" then error("d::meh didn't work as expected")
elif e::bah != "bah" then error("e::bah didn't work as expected")
elif f::f != "f is here" then error("f::f didn't work as expected")
else foo::a + "c" + d::meh + e::bah end;