增加执行脚本 + 获取脚本返回结果的方法
This commit is contained in:
17
vm_test.go
Normal file
17
vm_test.go
Normal file
@ -0,0 +1,17 @@
|
||||
// Package lua ...
|
||||
//
|
||||
// Description : lua ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2024-11-14 18:08
|
||||
package lua
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewVm(t *testing.T) {
|
||||
v := NewVm()
|
||||
v.Run(`print("hello world"); return "hahaha", "heiheihei"`)
|
||||
}
|
||||
Reference in New Issue
Block a user