diff options
Diffstat (limited to 'test/lib/completions/sudo.exp')
-rw-r--r-- | test/lib/completions/sudo.exp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/test/lib/completions/sudo.exp b/test/lib/completions/sudo.exp deleted file mode 100644 index 73e485d6..00000000 --- a/test/lib/completions/sudo.exp +++ /dev/null @@ -1,42 +0,0 @@ -proc setup {} { - save_env -} - - -proc teardown {} { - assert_env_unmodified {/OLDPWD/d} -} - - -setup - - -# Find user/group suitable for testing. -set failed_find_unique_completion 0 -foreach ug {user group} { - # compgen -A is used because it's a bash builtin and available everywhere. - # The || true part prevents exec from throwing an exception if nothing is - # found (very very unlikely). - set list [split [exec bash -c "compgen -A $ug || true"] "\n"] - if {![find_unique_completion_pair $list part$ug full$ug]} { - untested "Not running complex chown tests; no suitable test $ug found." - set failed_find_unique_completion 1 - } -} - -# These tests require an unique completion. -if {!$failed_find_unique_completion} { - - foreach prefix { - "funky\\ user:" "funky.user:" "funky\\.user:" "fu\\ nky.user:" - "f\\ o\\ o\\.\\bar:" "foo\\_b\\ a\\.r\\ :" - } { - set test "Check preserve special chars in $prefix$partgroup<TAB>" - #assert_complete_into "chown $prefix$partgroup" "chown $prefix$fullgroup " $test - assert_complete $prefix$fullgroup "sudo chown $prefix$partgroup" $test - sync_after_int - } -} - - -teardown |