diff --git a/test/lib/completions/rpm2tgz.exp b/test/lib/completions/rpm2tgz.exp index a6d08b97..eb597982 100644 --- a/test/lib/completions/rpm2tgz.exp +++ b/test/lib/completions/rpm2tgz.exp @@ -4,7 +4,7 @@ proc setup {} { proc teardown {} { - assert_env_unmodified + assert_env_unmodified {/OLDPWD=/d} } @@ -17,4 +17,15 @@ 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