summaryrefslogtreecommitdiff
path: root/test/lib/completions/mount.exp
blob: 9e40803ea87db92d51b1fc9808758afea8de3a3b (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
proc setup {} {
    save_env
};


proc teardown {} {
    assert_env_unmodified
};


setup


assert_complete_any "mount "


sync_after_int


set test "Check completing nfs mounts"
set expected [list /test/path /test/path2 /second/path]
set cmd "mount mocksrv:/"
assert_bash_exec {OLDPATH="$PATH"; PATH="$TESTDIR/fixtures/mount/bin:$PATH";}
# This needs an explicit cword param or will output "unresolved".
assert_complete $expected $cmd $test "/@" 20 "/"
sync_after_int
assert_bash_exec {PATH="$OLDPATH"; unset -v OLDPATH}


sync_after_int


teardown