mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 05:39:02 +00:00
Tests: Use FileSystem
instead of DeprecatedFile
This commit is contained in:
parent
1c54c8a01c
commit
03008ec4e0
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/cammo1123
Commit: 03008ec4e0
Pull-request: https://github.com/SerenityOS/serenity/pull/18026
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/caoimhebyrne ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/linusg
6 changed files with 615 additions and 565 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibFileSystem/FileSystem.h>
|
||||
#include <LibTest/TestCase.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
@ -217,11 +217,11 @@ TEST_CASE(unlink_symlink)
|
|||
perror("symlink");
|
||||
}
|
||||
|
||||
auto target_or_error = Core::DeprecatedFile::read_link("/tmp/linky");
|
||||
auto target_or_error = FileSystem::read_link("/tmp/linky"sv);
|
||||
EXPECT(!target_or_error.is_error());
|
||||
|
||||
auto target = target_or_error.release_value();
|
||||
EXPECT_EQ(target, "/proc/2/foo");
|
||||
EXPECT_EQ(target.bytes_as_string_view(), "/proc/2/foo"sv);
|
||||
|
||||
rc = unlink("/tmp/linky");
|
||||
EXPECT(rc >= 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue