* Fix tests run on desktop
Conditionalize tests appropriately so long path and new syntax
support are taken into account.
Move some test data into Theories for easier debugging.
Fix and add issue to colon check tests until we fix CoreCLR.
* Address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/551fe49174378adcbf785c0ab12fc69355cef6e8
We've visited this topic a few times... hopefully this is the last. We previously misunderstood some of how Windows handles symlinks, leading us to make some invalid choices on Unix. This addresses those issues.
For the most part with this commit, we now match Windows behavior on Unix wherever possible, while also trying to do something sensible on the Unix side. The only notable difference now comes into play for broken symlinks, due to a fundamental difference between symlinks on Windows and Unix: on Windows, a symlink is created as either a file or directory symlink and thus .NET can tell which it is even if it's broken... on Unix, a symlink only stores a path to its target, so when it's broken, there's no information about whether it's intended to be a file or a directory. As a result, we fall back to always treating it as a file.
Commit migrated from https://github.com/dotnet/corefx/commit/59da18fc926397f6674e1de86e296ca6e0dfe067
A number of tests involving ReadOnly files were failing on Unix and Linux when run with elevated user permissions (e.g. sudo). This commit modifies those Unix tests to accomodate either set of permissions and verify the result accordingly. This unfortunately means we can't verify if the behavior is 'right', only that it is executed correctly. Windows is unchanged.
Commit migrated from https://github.com/dotnet/corefx/commit/77d73d27d06cf331c1637bc4e1cdc5aa35b68887
Previously on unix we would use stat to get information about directories and files for DirectoryInfo and FileInfo. That meant that we wouldn't correctly report ReparsePoint for symlinks, and the code was changed to use LStat. But that then breaks important use cases, such as by DirectoryInfo.Exist for a symlink to a directory always returning false.
This commit provides a compromise: we first use lstat, and if we find it's a symlink, we use stat but remember separately that it's a symlink so we can include ReparsePoint in the reported attributes.
Commit migrated from https://github.com/dotnet/corefx/commit/36259dc3c72fb1dc2a71a06db6f7dce9ea88c642
When I rewrote the MemoryMappedFiles tests, I cribbed from the
System.IO.FileSystem test's base class and created a Common base class
that could be used by test projects that had temporary files to be cleaned up.
At the time, however, FileSystem's tests were undergoing heavy changes and
so I didn't update FileSystem's tests to use the common base. Now that
things have quieted down, I've made that change.
In doing so, I made a few tweaks to the FileSystem tests, where tests were
assuming that the test directory was always in the current directory, and
the consolidated base class puts temporary files in the user's temporary
directory instead.
Commit migrated from https://github.com/dotnet/corefx/commit/d7a19e92824e8a038553de20abf2497db0424ddb
-Modernized the tests for GetFIleSystemEntries and GetFiles, splitting each test case into a standalone method runnable through xunit. Similar versions of these tests now inherit from each other rather than just being copy-pasted like they were previously. Moved most test cases from using hardcoded file names to instead use GetTestFileName() in FileSystemTest.cs. Tested on Linux and Windows.
-Changed the names of some files and classes to better follow the naming conventions of the other FileSystem tests.
Commit migrated from https://github.com/dotnet/corefx/commit/9e20082a9498f2f9bf79bcebe80fd1f9efc1e39b