diff --git a/t_plugin_test.go b/t_plugin_test.go index f622199..d563a94 100644 --- a/t_plugin_test.go +++ b/t_plugin_test.go @@ -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) +// } +// }