summaryrefslogtreecommitdiff
path: root/test/lib/completions/modinfo.exp
blob: 90e9702a912daaea08be1a11d27f2226fc4b4302 (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
32
33
34
35
36
37
38
proc setup {} {
    save_env
}


proc teardown {} {
    assert_env_unmodified
}


setup


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 "modinfo in" $test
}


sync_after_int


set test "should not complete anything for non-existent kernel"
assert_no_complete "modinfo -k you-dont-have-such-kernel in" $test


sync_after_int


set test "should complete filepaths"
assert_complete "/tmp/" "modinfo /tm" $test -nospace


sync_after_int


teardown