mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: ls: check a too long file name is reported as "cannot access"
* tests/ls/ls-misc.pl (name-too-long): New test. https://github.com/uutils/coreutils/pull/15699 Link: https://github.com/coreutils/coreutils/pull/456
This commit is contained in:
1 parent
64ea3f0553
commit
40d9fe3e03
1 file changed
+11
-1
+11
-1
@@ -361,7 +361,17 @@ my @Tests =
|
||||
{ERR => "$prog: invalid --block-size argument '0'\n"},
|
||||
{EXIT => 2},
|
||||
] } ('', '--si', '-h')),
|
||||
);
|
||||
|
||||
# A file name component that is too long is reported like any other
|
||||
# file that cannot be accessed. ERR_SUBST avoids false ENOENT failures
|
||||
# where the long name might be allowed.
|
||||
do { my $long = 'x' x 1000;
|
||||
['name-too-long', $long,
|
||||
{ERR_SUBST=>"s/'$long':.*/'$long':/"},
|
||||
{ERR => "$prog: cannot access '$long':\n"},
|
||||
{EXIT => 2},
|
||||
] },
|
||||
);
|
||||
|
||||
umask 022;
|
||||
|
||||
|
||||
Reference in new issue
Block a user