32 lines
675 B
Go
32 lines
675 B
Go
|
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
|
||
|
// All rights reserved.
|
||
|
|
||
|
// t_plugin_test.go
|
||
|
package expr
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func _TestImportPlugin(t *testing.T) {
|
||
|
if err := importPlugin([]string{"test-resources"}, "json"); err != nil {
|
||
|
t.Errorf("importPlugin() failed: %v", err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestPluginExists(t *testing.T) {
|
||
|
name := "json"
|
||
|
exists := pluginExists(name)
|
||
|
t.Logf("pluginExists(%v): %v", name, exists)
|
||
|
|
||
|
}
|
||
|
|
||
|
func TestMakePluginName(t *testing.T) {
|
||
|
name := "json"
|
||
|
want := "expr-" + name + "-plugin.so"
|
||
|
|
||
|
if got := makePluginName(name); got != want {
|
||
|
t.Errorf("makePluginName(%q) failed: Got: %q, Want: %q", name, got, want)
|
||
|
}
|
||
|
}
|