Add test ensuring behaviour is correct

This commit is contained in:
Timidger 2017-11-07 20:13:52 -08:00
parent 8ac27877e4
commit f9c451bd26
1 changed files with 10 additions and 0 deletions

View File

@ -629,6 +629,16 @@ fn test_recursive_callback_panic() {
.unwrap(); .unwrap();
} }
#[test]
fn test_set_metatable_nil() {
let lua = Lua::new();
lua.exec::<()>(
r#"
a = {}
setmetatable(a, nil)
"#, None).unwrap();
}
// TODO: Need to use compiletest-rs or similar to make sure these don't compile. // TODO: Need to use compiletest-rs or similar to make sure these don't compile.
/* /*
#[test] #[test]