aboutsummaryrefslogtreecommitdiffstats
path: root/plugins_test.go
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-05-31 21:36:10 +0000
committerterminaldweller <devi@terminaldweller.com>2024-05-31 21:36:10 +0000
commit0e1a3e59bed9b8328d9ee98a0bd0b2cb10bbe229 (patch)
tree2c8213d5de479cc96c36f5318feafcfcdc1e5ecb /plugins_test.go
parentfixes #30 (diff)
downloadmilla-0e1a3e59bed9b8328d9ee98a0bd0b2cb10bbe229.tar.gz
milla-0e1a3e59bed9b8328d9ee98a0bd0b2cb10bbe229.zip
initial support for lua, WIP
Diffstat (limited to 'plugins_test.go')
-rw-r--r--plugins_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins_test.go b/plugins_test.go
new file mode 100644
index 0000000..c6cd7ef
--- /dev/null
+++ b/plugins_test.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "testing"
+
+ lua "github.com/yuin/gopher-lua"
+)
+
+func MetaTableTest(t *testing.T) {
+ luaState := lua.NewState()
+ defer luaState.Close()
+
+ RegisterCustomLuaTypes(luaState)
+
+ if err := luaState.DoString(`
+ config = toml_config.new()
+ print(config:IrcServer())
+ config:TrcServer("irc.freenode.net")
+ print(config:IrcServer())
+ `); err != nil {
+ t.Fatal(err)
+ }
+}