# HG changeset patch # User Sergey Kandaurov # Date 1431939904 -10800 # Node ID 90f9b128b21826bb366a95223ff9738bbd8e4bee # Parent 239ade56c01538b409dc6969ee482e6d36b55fae Tests: handled legacy 'darwin' behavior in disable_symlinks tests. Unlike stated in the newer Open Group Base Specifications Issue 7, opening a symlink to the non-directory entry with a trailing slash would succeed in 'darwin'-like systems: [ENOTDIR] <..>the path argument contains at least one non- character and ends with one or more trailing characters, and the last pathname component names an existing file that is neither a directory nor a symbolic link to a directory<..> See for details how it was fixed in FreeBSD 7+: http://bugs.freebsd.org/21768 diff --git a/http_disable_symlinks.t b/http_disable_symlinks.t --- a/http_disable_symlinks.t +++ b/http_disable_symlinks.t @@ -259,10 +259,11 @@ like(http_get('/complex/3/empty.html'), # tests to pass as openat() will correctly fail with ENOTDIR chmod(0700, "$d/link"); +my $rc = $^O eq 'darwin' ? 200 : 404; like(http_get('/link/tail'), qr!40[34] !, 'file with trailing /, on'); like(http_get('/link/tailowner'), qr!404 !, 'file with trailing /, owner'); -like(http_get('/link/tailoff'), qr!404 !, 'file with trailing /, off'); +like(http_get('/link/tailoff'), qr!$rc !, 'file with trailing /, off'); like(http_get('/dirlink'), qr!404 !, 'directory without /'); like(http_get('/dirlink/'), qr!404 !, 'directory with trailing /');