diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
commit | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /test/lib/completions/chown.exp | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'test/lib/completions/chown.exp')
-rw-r--r-- | test/lib/completions/chown.exp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/lib/completions/chown.exp b/test/lib/completions/chown.exp deleted file mode 100644 index 792d52a9..00000000 --- a/test/lib/completions/chown.exp +++ /dev/null @@ -1,43 +0,0 @@ -proc setup {} { - # fake root command to get all users/groups completed at least for now - assert_bash_exec {root_command=sudo} - save_env -} - -proc teardown {} { - assert_env_unmodified -} - - -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 "chown $prefix$partgroup" $test - sync_after_int - } -} - - -teardown |