diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-13 12:45:01 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-13 12:45:01 +0900 |
| commit | ba0935c71f5507958056201ddad2fc48674a586d (patch) | |
| tree | 1fd1e98765cb4ef61dfb5d83de2876bba79c9377 /src/pattern_test.go | |
| parent | d83eb2800a09d86e17c0339d86bd1f22f68164a8 (diff) | |
| download | fzf-ba0935c71f5507958056201ddad2fc48674a586d.tar.gz | |
Fix change-nth
* Proper clean-up of caches
* Force rerender list after the action
Diffstat (limited to 'src/pattern_test.go')
| -rw-r--r-- | src/pattern_test.go | 6 |
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) { |
