Skip to content
Myr

Test cases for non-default --scheme options

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 4ae3069 · Browse files · 4 files+16 added−9 removed
This commit

State

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

Diff stats

4 files+16 added−9 removed

  • tests:+8 added−4 removed
  • other:+8 added−5 removed

4 files+16 added−9 removed

modified:.github/workflows/linux.yml+1 added-1 removed
modified:test/test_go.rb+8 added-4 removed
3367 unmodified lines
3368 end33693370 def test_boundary_match3371 # Underscore boundaries should be ranked lower3372 assert_equal(3373 %w[[x] -x- -x_ _x- _x_],3374 `printf -- 'xxx\n-xx\nxx-\n_x_\n_x-\n-x_\n[x]\n-x-\n' | #{FZF} -f"'x'"`.lines(chomp: true)3375 )3372 {3373 default: [' x '] + %w[/x/ [x] -x- -x_ _x- _x_],3374 path: ['/x/', ' x '] + %w[[x] -x- -x_ _x- _x_],3375 history: ['[x]', '-x-', ' x '] + %w[/x/ -x_ _x- _x_]3376 }.each do |scheme, expected|3377 result = `printf -- 'xxx\n-xx\nxx-\n_x_\n_x-\n-x_\n[x]\n-x-\n x \n/x/\n' | #{FZF} -f"'x'" --scheme=#{scheme}`.lines(chomp: true)3378 assert_equal expected, result3379 end3380 end3381end33823383module TestShell
521 unmodified lines
modified:.rubocop.yml+2 added-2 removed
modified:Makefile+5 added-2 removed
75 unmodified lines
7677all: target/$(BINARY)7879test: $(SOURCES)80 [ -z "$$(gofmt -s -d src)" ] || (gofmt -s -d src; exit 1)80 SHELL=/bin/sh GOOS= $(GO) test -v -tags "$(TAGS)" \81 github.com/junegunn/fzf/src \82 github.com/junegunn/fzf/src/algo \83 github.com/junegunn/fzf/src/tui \
1 unmodified line
8586bench:87 cd src && SHELL=/bin/sh GOOS= $(GO) test -v -tags "$(TAGS)" -run=Bench -bench=. -benchmem8889lint: $(SOURCES) test/test_go.rb90 [ -z "$$(gofmt -s -d src)" ] || (gofmt -s -d src; exit 1)91 rubocop --require rubocop-minitest --require rubocop-performance9293install: bin/fzf9495generate:96 PATH=$(PATH):$(GOPATH)/bin $(GO) generate ./...
89 unmodified lines
186update:187 $(GO) get -u188 $(GO) mod tidy189187.PHONY: all generate build release test bench install clean docker docker-test update190.PHONY: all generate build release test bench lint install clean docker docker-test update