/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | DefaultFileSystemProvider2Test.java | 83 public FilesSetup filesSetup = new FilesSetup(); field in DefaultFileSystemProvider2Test 89 provider = filesSetup.getDataFilePath().getFileSystem().provider(); in setUp() 94 provider.move(filesSetup.getDataFilePath(), filesSetup.getTestPath()); in test_move() 95 assertEquals(TEST_FILE_DATA, readFromFile(filesSetup.getTestPath())); in test_move() 96 assertFalse(Files.exists(filesSetup.getDataFilePath())); in test_move() 98 filesSetup.reset(); in test_move() 99 Files.createFile(filesSetup.getTestPath()); in test_move() 102 provider.move(filesSetup.getDataFilePath(), filesSetup.getTestPath()); in test_move() 107 filesSetup.reset(); in test_move() 108 Files.createFile(filesSetup.getTestPath()); in test_move() [all …]
|
D | DefaultFileSystemProviderTest.java | 81 public FilesSetup filesSetup = new FilesSetup(); field in DefaultFileSystemProviderTest 87 provider = filesSetup.getDataFilePath().getFileSystem().provider(); in setUp() 92 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), READ)) { in test_newInputStream() 100 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), WRITE)) { in test_newInputStream_openOption() 105 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), APPEND)) { in test_newInputStream_openOption() 110 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), in test_newInputStream_openOption() 117 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), DELETE_ON_CLOSE, in test_newInputStream_openOption() 125 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), READ); in test_newInputStream_twice() 127 InputStream is2 = provider.newInputStream(filesSetup.getDataFilePath(), READ)) { in test_newInputStream_twice() 140 try (InputStream is = provider.newInputStream(filesSetup.getDataFilePath(), in test_newInputStream_NPE() [all …]
|
D | Files2Test.java | 98 public FilesSetup filesSetup = new FilesSetup(); field in Files2Test 160 Files.probeContentType(filesSetup.getPathInTestDir("file.txt"))); in test_probeContentType() 162 Files.probeContentType(filesSetup.getPathInTestDir("file.java"))); in test_probeContentType() 197 Files.getAttribute(filesSetup.getTestPath(), "basic:lastModifiedTime"); in test_getAttribute() 206 Files.getAttribute(filesSetup.getDataFilePath(), "xyz"); in test_getAttribute_Exception() 216 Files.getAttribute(filesSetup.getDataFilePath(), null); in test_getAttribute_Exception() 225 Files.createFile(filesSetup.getTestPath(), attr); in test_getPosixFilePermissions() 226 assertEquals(attr.value(), Files.getPosixFilePermissions(filesSetup.getTestPath())); in test_getPosixFilePermissions() 241 Files.setPosixFilePermissions(filesSetup.getDataFilePath(), perm); in test_setPosixFilePermissions() 242 assertEquals(attr.value(), Files.getPosixFilePermissions(filesSetup.getDataFilePath())); in test_setPosixFilePermissions() [all …]
|
D | FilesTest.java | 66 public FilesSetup filesSetup = new FilesSetup(); field in FilesTest 110 try (FileChannel sfc = FileChannel.open(filesSetup.getDataFilePath())) { in test_newByteChannel() 124 assertFalse(Files.exists(filesSetup.getTestPath())); in test_createFile() 125 Files.createFile(filesSetup.getTestPath()); in test_createFile() 126 assertTrue(Files.exists(filesSetup.getTestPath())); in test_createFile() 129 Path unicodeFilePath = filesSetup.getPathInTestDir("परीक्षण फ़ाइल"); in test_createFile() 135 Files.createFile(filesSetup.getDataFilePath()); in test_createFile() 152 Files.createFile(filesSetup.getTestPath(), attr); in test_createFile$String$Attr() 153 assertEquals(attr.value(), Files.getAttribute(filesSetup.getTestPath(), attr.name())); in test_createFile$String$Attr() 158 Path filePath2 = filesSetup.getPathInTestDir("new_file"); in test_createFile$String$Attr() [all …]
|
D | WatchServiceTest.java | 55 public final FilesSetup filesSetup = new FilesSetup(); field in WatchServiceTest 124 Path file = Paths.get(filesSetup.getTestDir(), "directory/file"); in test_singleFile() 125 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_singleFile() 168 Path file = Paths.get(filesSetup.getTestDir(), "directory/file"); in test_EventMask() 169 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_EventMask() 190 Path dirInDir = Paths.get(filesSetup.getTestDir(), "directory/dir"); in test_singleDirectory() 191 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_singleDirectory() 200 Path dirInDirInDir = Paths.get(filesSetup.getTestDir(), "directory/dir/dir"); in test_singleDirectory() 219 Path file = Paths.get(filesSetup.getTestDir(), "directory/file"); in test_cancel() 220 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_cancel() [all …]
|
D | LinuxPathTest.java | 57 public FilesSetup filesSetup = new FilesSetup(); field in LinuxPathTest 163 filesSetup.getTestPath().startsWith((String) null); in test_startsWith$String_NPE() 176 filesSetup.getTestPath().startsWith((Path) null); in test_startsWith$Path_NPE() 190 filesSetup.getTestPath().endsWith((Path)null); in test_endsWith$Path_NPE() 204 filesSetup.getTestPath().endsWith((String)null); in test_endsWith$String_NPE() 328 Files.createFile(filesSetup.getTestPath()); in test_toRealPath() 329 Path realPath = filesSetup.getTestPath().toRealPath(); in test_toRealPath() 330 assertTrue(Files.isSameFile(filesSetup.getTestPath().toAbsolutePath(), realPath)); in test_toRealPath() 334 Path dir = Paths.get(filesSetup.getTestDir(), "dir1/dir2"); in test_toRealPath() 335 Path file = Paths.get(filesSetup.getTestDir(), "dir1/dir2/../../file"); in test_toRealPath() [all …]
|
D | DefaultSecureDirectoryStreamTest.java | 68 public FilesSetup filesSetup = new FilesSetup(); field in DefaultSecureDirectoryStreamTest 76 path_root = filesSetup.getPathInTestDir("dir"); in setup() 77 path_dir1 = filesSetup.getPathInTestDir("dir/dir1"); in setup() 78 path_dir2 = filesSetup.getPathInTestDir("dir/dir2"); in setup() 79 path_dir3 = filesSetup.getPathInTestDir("dir/dir3"); in setup() 80 path_dir4 = filesSetup.getPathInTestDir("dir/dir1/dir4"); in setup() 82 path_f1 = filesSetup.getPathInTestDir("dir/f1"); in setup() 83 path_f2 = filesSetup.getPathInTestDir("dir/f2"); in setup() 84 path_f3 = filesSetup.getPathInTestDir("dir/f3"); in setup() 209 try (SeekableByteChannel sbc = ds_path_root.newByteChannel(filesSetup.getTestPath(), in test_newByteChannel() [all …]
|
D | FileSystemsTest.java | 52 public FilesSetup filesSetup = new FilesSetup(); field in FileSystemsTest 167 FileSystem fs = FileSystems.newFileSystem(filesSetup.getDataFilePath(), in test_newFileSystem$Path$ClassLoader_customClassLoader() 173 assertEquals(filesSetup.getDataFilePath(), pathValue); in test_newFileSystem$Path$ClassLoader_customClassLoader() 183 File jarFile = new File(filesSetup.getTestDir(), "filesystemstest.jar"); in createClassLoaderForTestFileSystems()
|