summaryrefslogtreecommitdiffstats
path: root/test/t/test_umount.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/test_umount.py')
-rw-r--r--test/t/test_umount.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/t/test_umount.py b/test/t/test_umount.py
index 2baf0da..de18835 100644
--- a/test/t/test_umount.py
+++ b/test/t/test_umount.py
@@ -1,3 +1,5 @@
+import sys
+
import pytest
from conftest import assert_bash_exec
@@ -11,12 +13,14 @@ class TestUmount:
(correctly) uses absolute paths. So we create a custom completion which
reads from a file in our text fixture instead.
"""
+ if sys.platform != "linux":
+ pytest.skip("Linux specific")
assert_bash_exec(bash, "unset COMPREPLY cur; unset -f _mnt_completion")
assert_bash_exec(
bash,
"_mnt_completion() { "
- "local cur=$(_get_cword); "
- "_linux_fstab $(_get_pword) < mount/test-fstab; "
+ "local cur prev;_comp_get_words cur prev; "
+ '_comp_cmd_umount__linux_fstab "$prev" < mount/test-fstab; '
"} && complete -F _mnt_completion _mnt",
)
request.addfinalizer(
@@ -75,9 +79,10 @@ class TestUmount:
def test_mnt_label_quote(self, completion, dummy_mnt):
assert completion == r"ian-it\'s\ awesome"
+ @pytest.mark.skipif(sys.platform != "linux", reason="Linux specific")
def test_linux_fstab_unescape(self, bash):
assert_bash_exec(bash, r"var=one\'two\\040three\\")
- assert_bash_exec(bash, "__linux_fstab_unescape var")
+ assert_bash_exec(bash, "_comp_cmd_umount__linux_fstab_unescape var")
output = assert_bash_exec(
bash, r'printf "%s\n" "$var"', want_output=True
)