Blob Blame History Raw
proc setup {} {
    save_env
}


proc teardown {} {
    assert_env_unmodified {/OLDPWD/d}
}


setup


assert_complete_any "mount "


sync_after_int


assert_complete_any "mount -t "


sync_after_int


set test "mount /dev/sda1 def should complete directory name"
assert_complete_dir "default/" "mount /dev/sda1 def" $::srcdir/fixtures/shared $test -nospace


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="$SRCDIRABS/fixtures/mount/bin:$PATH";}
# This needs an explicit cword param or will output "unresolved".
assert_complete $expected $cmd $test -expect-cmd-minus /
sync_after_int
assert_bash_exec {PATH="$OLDPATH"; unset -v OLDPATH}


sync_after_int


teardown