diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:24:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:24:27 +0000 |
commit | 6c18848a903eb3ee06dccd915859ce64195c257c (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /test/fixtures/mount | |
parent | Initial commit. (diff) | |
download | bash-completion-6c18848a903eb3ee06dccd915859ce64195c257c.tar.xz bash-completion-6c18848a903eb3ee06dccd915859ce64195c257c.zip |
Adding upstream version 1:2.11.upstream/1%2.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/fixtures/mount')
-rwxr-xr-x | test/fixtures/mount/bin/showmount | 12 | ||||
-rw-r--r-- | test/fixtures/mount/test-fstab | 24 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/fixtures/mount/bin/showmount b/test/fixtures/mount/bin/showmount new file mode 100755 index 0000000..2751c4b --- /dev/null +++ b/test/fixtures/mount/bin/showmount @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ "$1" = -e ] && [ "$2" = mocksrv ]; then + echo "Header line" + echo "/test/path" + echo "/test/path2" + echo "/second/path" + exit 0 +fi + +echo "Usage: 'showmount -e mocksrv'; nothing else works." +exit 1 diff --git a/test/fixtures/mount/test-fstab b/test/fixtures/mount/test-fstab new file mode 100644 index 0000000..b243417 --- /dev/null +++ b/test/fixtures/mount/test-fstab @@ -0,0 +1,24 @@ +proc /proc proc defaults 0 0 +none /debug debugfs defaults,noauto 0 0 + +# Simple obvious test. +/mnt/nice-test-path /dev/null auto ro,noauto 0 0 + +# Test octal escapes +# Contains ' ' and '-' +/mnt/nice\040test\055path /dev/null auto ro,noauto 0 0 +# Contains '$' and '-' +/mnt/nice\044test\055path /dev/null auto ro,noauto 0 0 +# Contains ' ' and '\\' +/mnt/nice\040test\134path /dev/null auto ro,noauto 0 0 +# Contains '\n' and '\ ' +/mnt/nice\012test\040path /dev/null auto ro,noauto 0 0 + +# Test apostrophe +/mnt/nice'test-path /dev/null auto ro,noauto 0 0 +/mnt/other'test\040path /dev/null auto ro,noauto 0 0 + +# Test some labels +LABEL=Ubuntu\040Karmic /mnt/ubuntu auto no,noauto 0 0 +LABEL=Fedora /mnt/fedora auto ro,noauto 0 0 +LABEL=Debian-it's\040awesome /mnt/debian auto ro,noauto 0 0 |