Skip to content
Myr

test: add test for --match-nth

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

authored by Daniel Eklöf · committed by Daniel Eklöf · parent c006428 · Browse files · 2 files+23 added−0 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+23 added−0 removed

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

2 files+23 added−0 removed

added:test/match-nth.fish+22 added
1#!/usr/bin/fish23set got45function test_match_nth --argument-names input search with_nth_format match_nth_format6 set got (echo -e "$input" |7 $FUZZEL_TEST_BIN --dmenu \8 --search="$search" \9 --auto-select \10 --nth-delim ' ' \11 --with-nth="$with_nth_format" \12 --match-nth="$match_nth_format")13end1415test_match_nth "apple banana cherry" "banana" "{1}" "{2}"16@test "--match-nth with valid formatters" "$got" = "apple banana cherry"1718test_match_nth "apple banana cherry\nbanana apple cherry" "apple" "{1}" "{2}"19@test "--match-nth with valid formatters" "$got" = "banana apple cherry"2021test_match_nth "apple banana cherry" "cherry" "{1}" "{2..3}"22@test "--match-nth with index range" "$got" = "apple banana cherry"
modified:meson.build+1 added
239 unmodified lines
240 'accept-nth',241 'auto-select',242 'execute',243 'match-mode-fzf',244 'match-nth',245 ]246 test(test_case, fish,247 args: ['-c',248 'fishtape @0@/test/@1@.fish'.format(meson.current_source_dir(),
29 unmodified lines