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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
set test "--al<TAB> should complete \"--all\""
assert_complete "--all" "modprobe --al" $test
sync_after_int
set uname [exec bash -c "uname -r"]
if {[assert_exec "ls /lib/modules/$uname" "" "" "unsupported"]} {
set test "in<TAB> should complete modulename"
assert_complete_any "modprobe in" $test
}
sync_after_int
set test "should not complete anything for non-existent kernel"
assert_no_complete "modprobe -S you-dont-have-such-kernel in" $test
sync_after_int
set test "should not complete anything for non-existent module"
assert_no_complete "modprobe you-dont-have-such-module " $test
sync_after_int
set test "should complete filepaths"
assert_complete "/tmp/" "modprobe /tm" $test -nospace
sync_after_int
teardown
|