Skip to content
Myr

Update test case

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent e82eb27 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/pattern_test.go+3 added-3 removed
5 unmodified lines
6 "github.com/junegunn/fzf/src/algo"7)89func TestParseTermsExtended(t *testing.T) {10 terms := parseTerms(ModeExtended,10 terms := parseTerms(ModeExtended, CaseSmart,11 "aaa 'bbb ^ccc ddd$ !eee !'fff !^ggg !hhh$")12 if len(terms) != 8 ||13 terms[0].typ != termFuzzy || terms[0].inv ||14 terms[1].typ != termExact || terms[1].inv ||
15 unmodified lines
30 }31}3233func TestParseTermsExtendedExact(t *testing.T) {34 terms := parseTerms(ModeExtendedExact,34 terms := parseTerms(ModeExtendedExact, CaseSmart,35 "aaa 'bbb ^ccc ddd$ !eee !'fff !^ggg !hhh$")36 if len(terms) != 8 ||37 terms[0].typ != termExact || terms[0].inv || len(terms[0].text) != 3 ||38 terms[1].typ != termExact || terms[1].inv || len(terms[1].text) != 4 ||
7 unmodified lines
46 }47}4849func TestParseTermsEmpty(t *testing.T) {50 terms := parseTerms(ModeExtended, "' $ ^ !' !^ !$")50 terms := parseTerms(ModeExtended, CaseSmart, "' $ ^ !' !^ !$")51 if len(terms) != 0 {52 t.Errorf("%s", terms)53 }54}
62 unmodified lines