summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrestez Dan Leonard <cdleonard@gmail.com>2010-02-08 06:52:20 +0200
committerCrestez Dan Leonard <cdleonard@gmail.com>2010-02-09 15:28:13 +0200
commit6e0dc07ee25ad9ab617ee8f5d2e861c8ef29d8bd (patch)
treeeb5727cd74f175c0fdc22f3ba061361f80643828
parent1c4b461882c94febb39a550e0fe3065208139757 (diff)
downloadbash-completion-6e0dc07ee25ad9ab617ee8f5d2e861c8ef29d8bd.tar.gz
(mount) Cleanup mount tests and test-fstab; fix obvious errors.
-rw-r--r--test/fixtures/mount/test-fstab10
-rw-r--r--test/lib/completions/mount.exp11
2 files changed, 15 insertions, 6 deletions
diff --git a/test/fixtures/mount/test-fstab b/test/fixtures/mount/test-fstab
index 95fdd8d0..71036441 100644
--- a/test/fixtures/mount/test-fstab
+++ b/test/fixtures/mount/test-fstab
@@ -1,8 +1,10 @@
proc /proc proc defaults 0 0
none /debug debugfs defaults,noauto 0 0
-# Test octal escapes
+# 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 '-'
@@ -13,8 +15,8 @@ none /debug debugfs defaults,noauto 0 0
/mnt/nice\012test\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
+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
#/dev/null /mnt/nice'testxxxpath auto ro,noauto 0 0
diff --git a/test/lib/completions/mount.exp b/test/lib/completions/mount.exp
index bcb95ba4..74022371 100644
--- a/test/lib/completions/mount.exp
+++ b/test/lib/completions/mount.exp
@@ -57,6 +57,9 @@ assert_bash_exec {PATH="$OLDPATH"; unset -v OLDPATH}
sync_after_int
+assert_complete {/mnt/nice-test-path} {mnt /mnt/nice-test-p}
+sync_after_int
+
assert_complete {/mnt/nice\ test-path} {mnt /mnt/nice\ test-p}
sync_after_int
@@ -66,13 +69,17 @@ sync_after_int
assert_complete {/mnt/nice\ test\\path} {mnt /mnt/nice\ test\\p}
sync_after_int
-assert_complete {/mnt/nice\ test-path} {mnt /mnt/nice\ }
+assert_complete {{/mnt/nice\ test\\path} {/mnt/nice\ test-path}} \
+ {mnt /mnt/nice\ } "" /@ 20 {/mnt/nice\ }
sync_after_int
assert_complete {/mnt/nice\$test-path} {mnt /mnt/nice\$}
sync_after_int
-assert_complete {'/mnt/nice\ test-path'} {mnt '/mnt/nice\ }
+assert_complete {$'/mnt/nice-test-path'} {mnt $'/mnt/nice-}
+sync_after_int
+
+assert_complete {$'/mnt/nice\ntest-path'} {mnt $'/mnt/nice\n}
sync_after_int