mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibFileSystem+Everywhere: Return ByteString from read_link()
This commit is contained in:
parent
cac66aeb53
commit
8d80841e9c
11 changed files with 34 additions and 43 deletions
|
@ -86,8 +86,7 @@ TEST_CASE(test_mkstemp_unique_filename)
|
|||
auto fd = mkstemp(path);
|
||||
EXPECT_NE(fd, -1);
|
||||
|
||||
auto temp_path_string = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
auto temp_path = temp_path_string.to_byte_string();
|
||||
auto temp_path = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
EXPECT(temp_path.characters());
|
||||
|
||||
close(fd);
|
||||
|
@ -105,8 +104,7 @@ TEST_CASE(test_mkstemp_unique_filename)
|
|||
auto fd = mkstemp(path);
|
||||
EXPECT(fd != -1);
|
||||
|
||||
auto path2_string = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
auto path2 = path2_string.to_byte_string();
|
||||
auto path2 = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
EXPECT(path2.characters());
|
||||
|
||||
close(fd);
|
||||
|
@ -128,8 +126,7 @@ TEST_CASE(test_mkstemps_unique_filename)
|
|||
auto fd = mkstemps(path, 6);
|
||||
EXPECT_NE(fd, -1);
|
||||
|
||||
auto temp_path_string = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
auto temp_path = temp_path_string.to_byte_string();
|
||||
auto temp_path = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
EXPECT(temp_path.characters());
|
||||
|
||||
close(fd);
|
||||
|
@ -151,8 +148,7 @@ TEST_CASE(test_mkstemps_unique_filename)
|
|||
auto fd = mkstemps(path, 6);
|
||||
EXPECT(fd != -1);
|
||||
|
||||
auto path2_string = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
auto path2 = path2_string.to_byte_string();
|
||||
auto path2 = TRY_OR_FAIL(FileSystem::read_link(ByteString::formatted("/proc/{}/fd/{}", getpid(), fd)));
|
||||
EXPECT(path2.characters());
|
||||
|
||||
close(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue