summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-16 12:59:21 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-01-16 12:59:21 +0200
commit6a7a8383100ab912a924b2fb11e49a56ff393706 (patch)
treeab05bba6c18189eba0f8634c80e8cbfe5aa90d79
parentef7f9dc89e3db29b68df62fc37c68b6232a9263a (diff)
downloadbash-completion-6a7a8383100ab912a924b2fb11e49a56ff393706.tar.gz
(testsuite) Check rpm -q completion against actual installed packages.
While at it, drop --eval completion test because I couldn't get it to work with assert_complete (probably because I couldn't escape the command properly here, see --eval|-E completion in contrib/rpm), and no longer needed match_max fiddling.
-rw-r--r--test/lib/completions/rpm.exp16
1 files changed, 4 insertions, 12 deletions
diff --git a/test/lib/completions/rpm.exp b/test/lib/completions/rpm.exp
index dffce93b..3ed154a9 100644
--- a/test/lib/completions/rpm.exp
+++ b/test/lib/completions/rpm.exp
@@ -8,9 +8,6 @@ proc teardown {} {
}; # teardown()
-set _old_match_max [match_max]
-match_max 100000
-
setup
@@ -20,18 +17,13 @@ assert_complete_any "rpm "
sync_after_int
-assert_complete_any "rpm -q "
-
-
-sync_after_int
-
-
-assert_complete_any "rpm --eval %"
+ # Build list of installed packages
+if {[assert_exec {rpm -qa --qf=%\{NAME\}\n | sort -u} packages]} {
+ assert_complete $packages "rpm -q "
+}; # if
sync_after_int
teardown
-
-match_max $_old_match_max