summaryrefslogtreecommitdiff
path: root/test/lib/completions/dpkg.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/completions/dpkg.exp')
-rw-r--r--test/lib/completions/dpkg.exp14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/lib/completions/dpkg.exp b/test/lib/completions/dpkg.exp
index f358e172..0ea6ded3 100644
--- a/test/lib/completions/dpkg.exp
+++ b/test/lib/completions/dpkg.exp
@@ -12,17 +12,23 @@ setup
assert_complete_any "dpkg --c"
-
-
sync_after_int
- # Build list of installed packages
-if {[assert_exec {dpkg --get-selections | command grep \[\[:space:\]\]install$ | cut -f1} packages]} {
+# Build list of installed packages
+if {[assert_exec {dpkg --get-selections | command grep \[\[:space:\]\]install$ | cut -f1} packages "" "untested"]} {
assert_complete $packages "dpkg -L "
}
+sync_after_int
+set test "dpkg -i ~part should complete to ~full/ if home dir exists"
+# https://bugs.debian.org/864691
+# Create list of users, having existing home dir
+assert_bash_exec {for u in $(compgen -u); do \
+ eval test -d ~$u && echo $u; unset u; done} {} /@ users
+find_unique_completion_pair $users part full
+assert_complete "~$full/" "dpkg -i ~$part" $test -nospace
sync_after_int