summaryrefslogtreecommitdiff
path: root/test/lib/completions/rpm2tgz.exp
blob: eb59798207a78cc40262d3b953d6b72bfdee2479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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