test(lua): add .olean corrupted file tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
75abcea83f
commit
37b5570e99
7 changed files with 20 additions and 1 deletions
|
@ -6,6 +6,6 @@ function check_error(f)
|
|||
if ok then
|
||||
error("unexpected success...")
|
||||
else
|
||||
print("caught expected error: ", msg)
|
||||
print("caught expected error: ", msg:what())
|
||||
end
|
||||
end
|
||||
|
|
3
tests/lua/mod3.lua
Normal file
3
tests/lua/mod3.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local env = environment()
|
||||
env = add_decl(env, mk_var_decl("A", Type))
|
||||
env:export("mod3_mod.olean")
|
BIN
tests/lua/mod3_corrupted1.olean
Normal file
BIN
tests/lua/mod3_corrupted1.olean
Normal file
Binary file not shown.
BIN
tests/lua/mod3_corrupted2.olean
Normal file
BIN
tests/lua/mod3_corrupted2.olean
Normal file
Binary file not shown.
BIN
tests/lua/mod3_corrupted3.olean
Normal file
BIN
tests/lua/mod3_corrupted3.olean
Normal file
Binary file not shown.
BIN
tests/lua/mod3_corrupted4.olean
Normal file
BIN
tests/lua/mod3_corrupted4.olean
Normal file
Binary file not shown.
16
tests/lua/mod3b.lua
Normal file
16
tests/lua/mod3b.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
check_error(function()
|
||||
local env = import_modules("mod3_corrupted1")
|
||||
end
|
||||
)
|
||||
check_error(function()
|
||||
local env = import_modules("mod3_corrupted2")
|
||||
end
|
||||
)
|
||||
check_error(function()
|
||||
local env = import_modules("mod3_corrupted3")
|
||||
end
|
||||
)
|
||||
check_error(function()
|
||||
local env = import_modules("mod3_corrupted4")
|
||||
end
|
||||
)
|
Loading…
Reference in a new issue