summaryrefslogtreecommitdiff
path: root/src/pattern_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pattern_test.go')
-rw-r--r--src/pattern_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pattern_test.go b/src/pattern_test.go
index 9f105f6a..1487d704 100644
--- a/src/pattern_test.go
+++ b/src/pattern_test.go
@@ -135,12 +135,12 @@ func TestOrigTextAndTransformed(t *testing.T) {
chunk.items[0] = Item{
text: util.ToChars([]byte("junegunn")),
origText: &origBytes,
- transformed: &trans}
+ transformed: &transformed{pattern.nth, trans}}
pattern.extended = extended
matches := pattern.matchChunk(&chunk, nil, slab) // No cache
if !(matches[0].item.text.ToString() == "junegunn" &&
string(*matches[0].item.origText) == "junegunn.choi" &&
- reflect.DeepEqual(*matches[0].item.transformed, trans)) {
+ reflect.DeepEqual((*matches[0].item.transformed).tokens, trans)) {
t.Error("Invalid match result", matches)
}
@@ -148,7 +148,7 @@ func TestOrigTextAndTransformed(t *testing.T) {
if !(match.item.text.ToString() == "junegunn" &&
string(*match.item.origText) == "junegunn.choi" &&
offsets[0][0] == 0 && offsets[0][1] == 5 &&
- reflect.DeepEqual(*match.item.transformed, trans)) {
+ reflect.DeepEqual((*match.item.transformed).tokens, trans)) {
t.Error("Invalid match result", match, offsets, extended)
}
if !((*pos)[0] == 4 && (*pos)[1] == 0) {