1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 07:28:56 +01:00
This commit is contained in:
James Littlejohn 2017-07-21 10:57:52 +10:00
parent 8ee8cef491
commit 3d99b41252

View File

@ -1,6 +1,7 @@
package expressions
import (
"errors"
"fmt"
"strings"
"testing"
@ -134,6 +135,10 @@ func TestEvaluateString(t *testing.T) {
_, err = EvaluateString("1 | undefined_filter", ctx)
require.Error(t, err)
cfg.AddFilter("error", func(input interface{}) (string, error) { return "", errors.New("test error") })
_, err = EvaluateString("1 | error", ctx)
require.Error(t, err)
}
func TestClosure(t *testing.T) {