Skip to content

Commit 78dd5b0

Browse files
committed
test(cryptsetup): update the skip condition
1 parent 02c0bd5 commit 78dd5b0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

completions/cryptsetup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _comp_cmd_cryptsetup__device()
1313
_comp_cmd_cryptsetup__action()
1414
{
1515
local ret IFS=$' \t\n'
16-
_comp_dequote "$1" || return 1
16+
_comp_dequote "${1-}" || return 1
1717
local cmd=${ret:-cryptsetup}
1818
local actions=$(
1919
{
@@ -45,7 +45,7 @@ _comp_cmd_cryptsetup__action()
4545
filtering_pattern=${filtering_pattern%$'\n'}
4646

4747
local filtered_actions
48-
filtered_actions=$(strings "$path" | grep -Fx "$filtering_pattern" | sort -u) &&
48+
filtered_actions=$(strings "$path" | command grep -Fx "$filtering_pattern" | sort -u) &&
4949
[[ $filtered_actions ]] &&
5050
actions=$filtered_actions
5151
fi

test/t/test_cryptsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_2(self, completion):
1313
@pytest.mark.complete(
1414
"cryptsetup luksE",
1515
require_cmd=True,
16-
skipif='! strings "$(type -P cryptsetup)" | grep -qFx luksErase',
16+
skipif=r'! { cryptsetup --help; man cryptsetup; } 2>/dev/null | command grep -qE "(^|[[:space:]])luksErase([[:space:]]|\$)"',
1717
)
1818
def test_github_issue758(self, completion):
1919
assert completion == "rase"

0 commit comments

Comments
 (0)