summaryrefslogtreecommitdiffstats
path: root/test/fixtures/mount
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures/mount')
-rwxr-xr-xtest/fixtures/mount/bin/showmount12
-rw-r--r--test/fixtures/mount/test-fstab24
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