aboutsummaryrefslogtreecommitdiffstats
path: root/plugins_test.go
blob: c6cd7ef1860ed4e08372c53bd065296686000f73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)
	}
}