change: skip go plugin test for windows

This commit is contained in:
debugtalk
2021-12-28 22:26:27 +08:00
parent b573210644
commit 83e9bbf463
4 changed files with 48 additions and 32 deletions

View File

@@ -1,7 +1,6 @@
package hrp
import (
"plugin"
"sort"
"testing"
"time"
@@ -369,24 +368,6 @@ func TestCallBuiltinFunction(t *testing.T) {
}
}
func TestCallPluginFunction(t *testing.T) {
plugins, err := plugin.Open("examples/debugtalk.so")
if err != nil {
t.Fatalf(err.Error())
}
pluginLoader := &pluginLoader{plugins}
// call function without arguments
f1, _ := getMappingFunction("Concatenate", pluginLoader)
result, err := callFunc(f1, 1, "2", 3.14)
if !assert.NoError(t, err) {
t.Fail()
}
if !assert.Equal(t, result, "1_2_3.14") {
t.Fail()
}
}
func TestLiteralEval(t *testing.T) {
testData := []struct {
expr string