fzf/src
Vlastimil Ovčáčík 61339a8ae2
Add more tests of placeholder flags and simplify its logic (#2624)
* [tests] Test fzf's placeholders and escaping on practical commands

This tests some reasonable commands in fzf's templates (for commands,
previews, rebinds etc.), how are those commands escaped (backslashes,
double quotes), and documents if the output is executable in cmd.exe.
Both on Unix and Windows.

* [tests] Add testing of placeholder parsing and matching

Adds tests and bit of docs for the curly brackets placeholders in fzf's
template strings. Also tests the "placeholder" regex.

* [tests] Add more test cases of replacing placeholders focused on flags

Replacing placeholders in templates is already tested, this adds tests
that focus more on the parameters of placeholders - e.g. flags, token
ranges.

There is at least one test for each flag, not all combinations are
tested though.

* [refactoring] Split OS-specific function quoteEntry() to corresponding source file

This is minor refactoring, and also the function's test was made
crossplatform.

* [refactoring] Simplify replacePlaceholder function

Should be equivalent to the original, but has simpler structure.
2021-10-15 22:31:59 +09:00
..
algo Fix spelling error (Extention -> Extension) (#2589) 2021-08-17 16:40:24 +09:00
protector Add pledge(2) support (OpenBSD only) via a 'protector' package. (#1297) 2020-01-19 14:13:32 +09:00
tui Minor refactoring tcell library from tui.go to tcell.go 2021-10-03 01:39:30 +09:00
util [tests] Add testing of keyboard events in FullscreenRenderer.GetChar() 2021-10-03 01:39:30 +09:00
LICENSE 0.25.0 2021-01-03 00:56:11 +09:00
ansi.go Ignore more ANSI escape sequences 2021-04-06 00:51:39 +09:00
ansi_test.go fix: replace broken links with archived ones 2021-09-28 18:07:22 +09:00
cache.go Consolidate Result and rank structs 2017-07-18 03:14:33 +09:00
cache_test.go Check gofmt in `make test` 2021-02-28 18:28:21 +09:00
chunklist.go Experimental implementation of "reload" action 2019-11-10 11:43:37 +09:00
chunklist_test.go Remove count field from ChunkList 2017-08-16 12:26:06 +09:00
constants.go Kill input command on terminate 2021-03-07 11:30:26 +09:00
core.go Reset {n} after reload 2021-09-14 20:36:10 +09:00
history.go Code cleanup (#1640) 2019-07-19 13:22:35 +09:00
history_test.go Migrate to GitHub Actions 2021-01-13 19:10:24 +09:00
item.go Remove special nilItem 2017-08-15 01:10:41 +09:00
item_test.go Micro-optimizations 2016-08-19 02:39:32 +09:00
matcher.go Experimental implementation of "reload" action 2019-11-10 11:43:37 +09:00
merger.go Remove redundant assignment (#2356) 2021-02-17 10:28:43 +09:00
merger_test.go Further reduce unnecessary rune array conversion 2017-07-21 17:31:11 +09:00
options.go Do not check for --height support on --version 2021-09-29 20:17:44 +09:00
options_test.go Change --preview-window delimiter from : to , for consistency 2021-04-06 20:10:55 +09:00
pattern.go Check gofmt in `make test` 2021-02-28 18:28:21 +09:00
pattern_test.go Check gofmt in `make test` 2021-02-28 18:28:21 +09:00
reader.go [windows] Do not include directories in the list 2020-03-14 21:43:35 +09:00
reader_test.go Change the tests to run on Windows (#2615) 2021-09-24 09:45:06 +09:00
result.go Fix typos in source code (#2322) 2021-01-15 10:10:09 +09:00
result_others.go Optimize rank comparison on x86 (little-endian) 2017-08-27 01:46:11 +09:00
result_test.go Check gofmt in `make test` 2021-02-28 18:28:21 +09:00
result_x86.go Optimize rank comparison on x86 (little-endian) 2017-08-27 01:46:11 +09:00
terminal.go Add more tests of placeholder flags and simplify its logic (#2624) 2021-10-15 22:31:59 +09:00
terminal_test.go Add more tests of placeholder flags and simplify its logic (#2624) 2021-10-15 22:31:59 +09:00
terminal_unix.go Add more tests of placeholder flags and simplify its logic (#2624) 2021-10-15 22:31:59 +09:00
terminal_windows.go Add more tests of placeholder flags and simplify its logic (#2624) 2021-10-15 22:31:59 +09:00
tokenizer.go Fix typos in source code (#2322) 2021-01-15 10:10:09 +09:00
tokenizer_test.go Code cleanup: remove unnecessary string conversions (#1642) 2019-07-19 13:23:18 +09:00