summaryrefslogtreecommitdiff
path: root/combinator_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'combinator_test.go')
-rw-r--r--combinator_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/combinator_test.go b/combinator_test.go
index b197105..50b7010 100644
--- a/combinator_test.go
+++ b/combinator_test.go
@@ -199,6 +199,12 @@ func TestMerge(t *testing.T) {
})
}
+func TestMapShorthand(t *testing.T) {
+ Chars("a-z").Map(func(n Result) Result {
+ return Result{Result: n.Token}
+ })
+}
+
func assertSequence(t *testing.T, node Result, expected ...string) {
require.NotNil(t, node)
actual := []string{}