diff options
author | Timidger <APragmaticPlace@gmail.com> | 2017-11-07 20:13:52 -0800 |
---|---|---|
committer | Timidger <APragmaticPlace@gmail.com> | 2017-11-07 20:13:52 -0800 |
commit | f9c451bd267a02d455eda0e3d79c85e544adce1f (patch) | |
tree | 9203cd148429dacfcbd58bdbde82cdce1bf33679 /src | |
parent | 8ac27877e4e41c4000d1129d7fe598d9e81d5cea (diff) | |
download | mlua-f9c451bd267a02d455eda0e3d79c85e544adce1f.zip |
Add test ensuring behaviour is correct
Diffstat (limited to 'src')
-rw-r--r-- | src/tests.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests.rs b/src/tests.rs index c2e3e00..e83b3ba 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -629,6 +629,16 @@ fn test_recursive_callback_panic() { .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. /* #[test] |