diff options
author | Jim Meyering <jim@meyering.net> | 2005-09-05 17:13:09 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-09-05 17:13:09 +0000 |
commit | ae14879ab90b8bc747173aa406f8665e84cdc7af (patch) | |
tree | c0337a5c98a96bec07511618b6e55a2ef4c86cf9 /tests/ls-2 | |
parent | ac46781470f3a62c0fbbbdc5304f0de83b6acfa4 (diff) | |
download | coreutils-ae14879ab90b8bc747173aa406f8665e84cdc7af.tar.xz |
(setuid-etc): New test, for today's addition of colorization for
setuid, setgid files and sticky, other-writable, sticky-and-other-writable
directories.
Diffstat (limited to 'tests/ls-2')
-rwxr-xr-x | tests/ls-2/tests | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ls-2/tests b/tests/ls-2/tests index f7c702dd9..690203ecd 100755 --- a/tests/ls-2/tests +++ b/tests/ls-2/tests @@ -97,6 +97,27 @@ my @Tests = $mkdir, $rmdir, {EXIT => 2}], ['recursive-2', '-R d', {OUT => "d:\ne\n\nd/e:\n"}, $mkdir2, $rmdir2], + + ['setuid-etc', '-1 -d --color=always owr owt setgid setuid sticky', + {OUT => + "\e[0m\e[34;42mowr\e[0m\n" + . "\e[30;42mowt\e[0m\n" + . "\e[30;43msetgid\e[0m\n" + . "\e[37;41msetuid\e[0m\n" + . "\e[37;44msticky\e[0m\n" + . "\e[m" + }, + {PRE => sub { + system + "touch setuid && chmod u+s setuid;" + ."touch setgid && chmod g+s setgid;" + ."mkdir sticky && chmod +t sticky;" + ."mkdir owt && chmod +t,o+w owt;" + ."mkdir owr && chmod o+w owr" }}, + {POST => sub { + unlink qw(setuid setgid); + foreach my $dir (qw(owr owt sticky)) {rmdir $dir} }}, + ], ); my $save_temps = $ENV{SAVE_TEMPS}; |