summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimidger <APragmaticPlace@gmail.com>2017-11-07 20:13:52 -0800
committerTimidger <APragmaticPlace@gmail.com>2017-11-07 20:13:52 -0800
commitf9c451bd267a02d455eda0e3d79c85e544adce1f (patch)
tree9203cd148429dacfcbd58bdbde82cdce1bf33679 /src
parent8ac27877e4e41c4000d1129d7fe598d9e81d5cea (diff)
downloadmlua-f9c451bd267a02d455eda0e3d79c85e544adce1f.zip
Add test ensuring behaviour is correct
Diffstat (limited to 'src')
-rw-r--r--src/tests.rs10
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]