Skip to content
Myr

walker: Append path separator to directories

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

Close #4255

authored by Junegunn Choi · committed by Junegunn Choi · parent f975b40 · Browse files · 2 files+3 added−2 removed
This commit

State

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

Diff stats

2 files+3 added−2 removed

  • tests:+2 added−2 removed
  • other:+1 added−0 removed

2 files+3 added−2 removed

modified:src/reader.go+1 added
318 unmodified lines
319 if strings.HasSuffix(path, ignore) {320 return filepath.SkipDir321 }322 }323 path += sep324 }325 if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher(stringBytes(path)) {326 atomic.StoreInt32(&r.event, int32(EvtReadNew))327 }
44 unmodified lines
modified:test/test_shell_integration.rb+2 added-2 removed
71 unmodified lines
72 def test_alt_c73 tmux.prepare74 tmux.send_keys :Escape, :c75 lines = tmux.until { |lines| assert_operator lines.match_count, :>, 0 }76 expected = lines.reverse.find { |l| l.start_with?('> ') }[2..]76 expected = lines.reverse.find { |l| l.start_with?('> ') }[2..].chomp('/')77 tmux.send_keys :Enter78 tmux.prepare79 tmux.send_keys :pwd, :Enter80 tmux.until { |lines| assert lines[-1]&.end_with?(expected) }
159 unmodified lines
240 tmux.send_keys 55241 tmux.until do |lines|242 assert_equal 1, lines.match_count243 assert_includes lines, '> 55'244 assert_includes lines, '> /tmp/fzf-test/d55'244 assert_includes lines, '> /tmp/fzf-test/d55/'245 end246 tmux.send_keys :Enter247 tmux.until(true) { |lines| assert_equal 'cd /tmp/fzf-test/d55/', lines[-1] }248 tmux.send_keys :xx
237 unmodified lines