diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-06-01 00:01:24 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-06-01 00:01:24 +0000 |
commit | 6931cf779ecdfd42dcb30d6bf5a65065f0f4b84b (patch) | |
tree | 15051d6f222ebfdfa2e23dbe1a659cbb719c0182 /plugins_test.go | |
parent | added gopher-lua to the thank you list (diff) | |
download | milla-6931cf779ecdfd42dcb30d6bf5a65065f0f4b84b.tar.gz milla-6931cf779ecdfd42dcb30d6bf5a65065f0f4b84b.zip |
tables are working now
Diffstat (limited to 'plugins_test.go')
-rw-r--r-- | plugins_test.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins_test.go b/plugins_test.go index c6cd7ef..894ff3c 100644 --- a/plugins_test.go +++ b/plugins_test.go @@ -6,16 +6,27 @@ import ( lua "github.com/yuin/gopher-lua" ) -func MetaTableTest(t *testing.T) { +func TestMetaTable(t *testing.T) { luaState := lua.NewState() defer luaState.Close() RegisterCustomLuaTypes(luaState) if err := luaState.DoString(` + print("Testing MetaTable") + print(toml_config) + + for index, data in ipairs(toml_config) do + print(index, data) + for k,v in pairs(data) do + print("one") + print(k,v) + end + end + config = toml_config.new() print(config:IrcServer()) - config:TrcServer("irc.freenode.net") + config:IrcServer("irc.freenode.net") print(config:IrcServer()) `); err != nil { t.Fatal(err) |