Skip to content

Commit

Permalink
test(cryptsetup): update the skip condition
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 13, 2024
1 parent 830a868 commit 1c5be70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions completions/cryptsetup
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _comp_cmd_cryptsetup__device()
_comp_cmd_cryptsetup__action()
{
local REPLY IFS=$' \t\n'
_comp_dequote "$1" || return 1
_comp_dequote "${1-}" || return 1
local cmd=${REPLY:-cryptsetup}
local -a actions
_comp_split -l actions "$(
Expand Down Expand Up @@ -46,7 +46,7 @@ _comp_cmd_cryptsetup__action()
filtering_pattern=${filtering_pattern%$'\n'}

local filtered_actions
filtered_actions=$(strings "$path" | grep -Fx "$filtering_pattern" | sort -u) &&
filtered_actions=$(strings "$path" | command grep -Fx "$filtering_pattern" | sort -u) &&
[[ $filtered_actions ]] &&
_comp_split -l actions "$filtered_actions"
fi
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_cryptsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_2(self, completion):
@pytest.mark.complete(
"cryptsetup luksE",
require_cmd=True,
skipif='! strings "$(type -P cryptsetup)" | grep -qFx luksErase',
skipif=r'! { cryptsetup --help; man cryptsetup; } 2>/dev/null | command grep -qE "(^|[[:space:]])luksErase([[:space:]]|\$)"',
)
def test_github_issue758(self, completion):
assert completion == "rase"

0 comments on commit 1c5be70

Please sign in to comment.