# Check that missing Wasm modules cause errors.

#error

! exec cue export -E --out cue
cmp stderr out/wasm

-- a.cue --
@extern("wasm")
package p

add: _ @extern("foo.wasm", abi=c, sig="func(int64, int64): int64")
sub: _ @extern("foo.wasm1", abi=c, sig="func(int64, int64): int64")

x: add(1, 2)
-- out/wasm --
@wasm: load "foo.wasm": file not found:
    ./a.cue:4:8
@wasm: load "foo.wasm1": invalid file name:
    ./a.cue:5:8
