diff --git a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs index 9bbfd271d2e474..e859959c07b054 100644 --- a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs +++ b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs @@ -94,15 +94,25 @@ public void Unix_ZipWithOSSpecificFileNames(string zipName, string fileName) /// when an attempt is made to extract them. /// [Theory] - [ActiveIssue("https://github.com/dotnet/runtime/issues/25099")] - [InlineData("WindowsInvalid_FromUnix", null)] - [InlineData("WindowsInvalid_FromWindows", null)] - [InlineData("NullCharFileName_FromWindows", "path")] - [InlineData("NullCharFileName_FromUnix", "path")] + [InlineData("NullCharFileName_FromWindows")] + [InlineData("NullCharFileName_FromUnix")] + [PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path + public void Windows_ZipWithInvalidFileNames_ThrowsArgumentException(string zipName) + { + AssertExtensions.Throws("path", null, () => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); + } + + /// + /// This test ensures that a zipfile with path names that are invalid to this OS will throw errors + /// when an attempt is made to extract them. + /// + [Theory] + [InlineData("WindowsInvalid_FromUnix")] + [InlineData("WindowsInvalid_FromWindows")] [PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path - public void Windows_ZipWithInvalidFileNames_ThrowsArgumentException(string zipName, string paramName) + public void Windows_ZipWithInvalidFileNames_ThrowsIOException(string zipName) { - AssertExtensions.Throws(paramName, null, () => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); + AssertExtensions.Throws(() => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); } [Theory]