JAVA-12359 Trying to fix failing unix platform test

This commit is contained in:
anuragkumawat 2022-06-18 11:50:52 +05:30
parent 2181c452d3
commit 8d7014cfc0
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import java.util.Arrays;
public class StringFilenameValidationUtils { public class StringFilenameValidationUtils {
public static final Character[] INVALID_WINDOWS_SPECIFIC_CHARS = {'"', '*', ':', '<', '>', '?', '\\', '|', '/'}; public static final Character[] INVALID_WINDOWS_SPECIFIC_CHARS = {'"', '*', ':', '<', '>', '?', '\\', '|'};
public static final Character[] INVALID_UNIX_SPECIFIC_CHARS = {'\000'}; public static final Character[] INVALID_UNIX_SPECIFIC_CHARS = {'\000'};
public static final String REGEX_PATTERN = "^[A-za-z0-9.]{1,255}$"; public static final String REGEX_PATTERN = "^[A-za-z0-9.]{1,255}$";

View File

@ -70,7 +70,7 @@ public class StringFilenameValidationUnitTest {
@ParameterizedTest @ParameterizedTest
@EnabledOnOs({OS.LINUX, OS.MAC}) @EnabledOnOs({OS.LINUX, OS.MAC})
@MethodSource("filenamesWithInvalidUnixChars") @MethodSource("filenamesWithInvalidWindowsChars")
public void givenFilenameStringWithInvalidWindowsCharAndIsUnix_whenValidateUsingIO_thenReturnTrue(String filename) throws IOException { public void givenFilenameStringWithInvalidWindowsCharAndIsUnix_whenValidateUsingIO_thenReturnTrue(String filename) throws IOException {
assertThat(validateStringFilenameUsingIO(filename)).isTrue(); assertThat(validateStringFilenameUsingIO(filename)).isTrue();
assertThat(validateStringFilenameUsingNIO2(filename)).isTrue(); assertThat(validateStringFilenameUsingNIO2(filename)).isTrue();