summaryrefslogtreecommitdiff
path: root/test/lib/completions/rpm2tgz.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/completions/rpm2tgz.exp')
-rw-r--r--test/lib/completions/rpm2tgz.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/lib/completions/rpm2tgz.exp b/test/lib/completions/rpm2tgz.exp
new file mode 100644
index 00000000..eb597982
--- /dev/null
+++ b/test/lib/completions/rpm2tgz.exp
@@ -0,0 +1,31 @@
+proc setup {} {
+ save_env
+}
+
+
+proc teardown {} {
+ assert_env_unmodified {/OLDPWD=/d}
+}
+
+
+setup
+
+
+assert_complete_any "rpm2tgz -"
+
+
+sync_after_int
+
+
+set test "should complete *.rpm files and dirs"
+set dir $::srcdir/fixtures/slackware/home
+set files [split [exec bash -c "cd $dir && find . -mindepth 1 -maxdepth 1 \
+ \\( -type d -printf '%P/\\n' \\) -o \
+ \\( -type f -name '*.rpm' -printf '%P\\n' \\)"] "\n"]
+assert_complete_dir $files "rpm2tgz " $dir $test
+
+
+sync_after_int
+
+
+teardown