1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

lua: Init with config and pool (#321)

* lua: Intial impl with config and pool

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-01-24 12:16:58 -08:00
committed by GitHub
parent 8fd5cdfc86
commit 55addbb556
9 changed files with 323 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
package luahost_test
import (
"strings"
"testing"
"github.com/inbucket/inbucket/pkg/extension"
"github.com/inbucket/inbucket/pkg/extension/luahost"
"github.com/stretchr/testify/require"
)
func TestEmptyScript(t *testing.T) {
script := ""
extHost := extension.NewHost()
_, err := luahost.NewFromReader(extHost, strings.NewReader(script), "test.lua")
require.NoError(t, err)
}