36 lines
661 B
Plaintext
36 lines
661 B
Plaintext
proc setup {} {
|
|
save_env
|
|
}
|
|
|
|
|
|
proc teardown {} {
|
|
assert_env_unmodified {/ROOT=/d}
|
|
}
|
|
|
|
|
|
setup
|
|
|
|
|
|
set test "-<TAB> should complete all options"
|
|
set options [list -copy -keep -preserve -warn]
|
|
assert_complete $options "removepkg -" $test
|
|
|
|
|
|
sync_after_int
|
|
|
|
|
|
set test "should complete files in \$ROOT/var/log/packages/"
|
|
# set env(ROOT) [file normalize $::srcdir/fixtures/slackware]
|
|
# set dir $env(ROOT)/var/log/packages/
|
|
set root [file normalize $::srcdir/fixtures/slackware]
|
|
set dir $root/var/log/packages/
|
|
assert_bash_exec "ROOT=$root"
|
|
set files [split [exec bash -c "cd $dir && ls"] "\n"]
|
|
assert_complete $files "removepkg " $test
|
|
|
|
|
|
sync_after_int
|
|
|
|
|
|
teardown
|