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
Provenance
- Commit
f510a4d- Tree
59a388b- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
4ae3069
4 files changed+16 added−9 removed
modified:.github/workflows/linux.yml+1 added-1 removed
34 unmodified lines353637383939404142435 unmodified lines34 unmodified lines - name: Install packages run: sudo apt-get install --yes zsh fish tmux
- name: Install Ruby gems run: sudo gem install --no-document minitest:5.17.0 rubocop:1.43.0 rubocop-minitest:0.25.1 rubocop-performance:1.15.2 run: sudo gem install --no-document minitest:5.25.1 rubocop:1.65.0 rubocop-minitest:0.35.1 rubocop-performance:1.21.1
- name: Rubocop run: rubocop --require rubocop-minitest --require rubocop-performance
5 unmodified linesmodified:test/test_go.rb+8 added-4 removed
3367 unmodified lines3368 end3369 3370 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 end3381 end3382 3383 module TestShell521 unmodified linesmodified:.rubocop.yml+2 added-2 removed
4 unmodified lines567899101112131415161718181920212210 unmodified lines4 unmodified linesLint/ShadowingOuterLocalVariable: Enabled: falseStyle/MethodCallWithArgsParentheses: Enabled: true IgnoredMethods: AllowedMethods: - assert - exit - paste - puts - raise - refute - require - send_keys IgnoredPatterns: AllowedPatterns: - ^assert_ - ^refute_Style/NumericPredicate: Enabled: false10 unmodified linesmodified:Makefile+5 added-2 removed
75 unmodified lines76 77 all: target/$(BINARY)78 79 test: $(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 line85 86 bench:87 cd src && SHELL=/bin/sh GOOS= $(GO) test -v -tags "$(TAGS)" -run=Bench -bench=. -benchmem88 89+lint: $(SOURCES) test/test_go.rb90+ [ -z "$$(gofmt -s -d src)" ] || (gofmt -s -d src; exit 1)91+ rubocop --require rubocop-minitest --require rubocop-performance92+93 install: bin/fzf94 95 generate:96 PATH=$(PATH):$(GOPATH)/bin $(GO) generate ./...89 unmodified lines186 update:187 $(GO) get -u188 $(GO) mod tidy189 187-.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