Skip to content

Commit b4b8916

Browse files
committed
test suite: Tolerate "See 'man feh'" feh --help output
1 parent 198ab64 commit b4b8916

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

completions/feh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ _feh()
100100
$split && return
101101

102102
if [[ "$cur" == -* ]]; then
103+
# Some versions of feh just output "See 'man feh'" for --help :(
103104
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
104105
[[ $COMPREPLY == *= ]] && compopt -o nospace
105106
[[ $COMPREPLY ]] && return

test/lib/completions/feh.exp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ assert_complete_any "feh "
1717
sync_after_int
1818

1919

20-
set test "--lis<TAB> should complete \"--list\""
21-
assert_complete "--list" "feh --lis" $test
20+
if {[assert_exec {feh --help | grep "man feh" || exit 1} "" "" "unsupported"]} {
21+
set test "--lis<TAB> should complete \"--list\""
22+
assert_complete "--list" "feh --lis" $test
23+
}
2224

2325

2426
sync_after_int

0 commit comments

Comments
 (0)