# Check that an imported package with bad syntax produces
# a sane error (it did panic).

! exec cue export
cmp stderr want-stderr
-- want-stderr --
test.example@v0: import failed: cannot find package "test.example/blah": cannot get imports: cannot read "blah/invalid.cue": missing ',' in struct literal:
    ./foo.cue:2:8
-- cue.mod/module.cue --
module: "test.example"
language: version: "v0.9.0"

-- foo.cue --
package foo
import "test.example/blah"

blah
-- blah/invalid.cue --
package blah

self: bad )
syntax
