t_plugin_test.go: TestLoadPluginName() removed due to linkage mismatch

This commit is contained in:
Celestino Amoroso 2026-04-23 22:02:41 +02:00
parent d7247f97c5
commit 2b80ba6789

View File

@ -5,7 +5,6 @@
package expr
import (
"os"
"testing"
)
@ -31,29 +30,29 @@ func TestPluginExists(t *testing.T) {
func TestMakePluginName(t *testing.T) {
name := "json"
want := "expr-" + name + "-plugin.so"
want := "expr-" + name + "-plugin" + SHAREDLIBRARY_EXTENSION
if got := makePluginName(name); got != want {
t.Errorf("makePluginName(%q) failed: Got: %q, Want: %q", name, got, want)
}
}
func TestLoadPluginName(t *testing.T) {
name := "json"
// want := "expr-" + name + "-plugin.so"
want := 1
// func TestLoadPluginName(t *testing.T) {
// name := "json"
// // want := "expr-" + name + "-plugin
// want := 1
os.Setenv("PLUGINS", "${HOME}/go/src/git.portale-stac.it/go")
// os.Setenv("EXPR_PLUGIN_PATH", "${PLUGINS}/expr-json-plugin:${PLUGINS}/expr-csv-plugin")
os.Setenv("EXPR_PLUGIN_PATH", "${PLUGINS}")
got, err := importPluginFromSearchPath(name)
// os.Setenv("PLUGINS", "${HOME}/go/src/git.portale-stac.it/go")
// // os.Setenv("EXPR_PLUGIN_PATH", "${PLUGINS}/expr-json-plugin:${PLUGINS}/expr-csv-plugin")
// os.Setenv("EXPR_PLUGIN_PATH", "${PLUGINS}")
// got, err := importPluginFromSearchPath(name)
if err != nil {
t.Errorf("importPluginFromSearchPath(%q) failed: %v", name, err)
return
}
// if err != nil {
// t.Errorf("importPluginFromSearchPath(%q) failed: %v", name, err)
// return
// }
if got != want {
t.Errorf("importPluginFromSearchPath(%q) failed: Got: %q, Want: %q", name, got, want)
}
}
// if got != want {
// t.Errorf("importPluginFromSearchPath(%q) failed: Got: %q, Want: %q", name, got, want)
// }
// }