1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

Tests: Use FileSystem instead of DeprecatedFile

This commit is contained in:
Cameron Youell 2023-03-27 00:37:51 +00:00 committed by Andrew Kaster
parent 1c54c8a01c
commit 03008ec4e0
6 changed files with 615 additions and 565 deletions

View file

@ -5,7 +5,7 @@
*/
#include <AK/DeprecatedString.h>
#include <LibCore/DeprecatedFile.h>
#include <LibFileSystem/FileSystem.h>
#include <LibTest/TestCase.h>
#include <fcntl.h>
#include <stdio.h>
@ -81,10 +81,10 @@ TEST_CASE(test_change_file_location)
ftruncate(fd, 0);
EXPECT(fchmod(fd, 06755) != -1);
auto suid_path_or_error = Core::DeprecatedFile::read_link(DeprecatedString::formatted("/proc/{}/fd/{}", getpid(), fd));
auto suid_path_or_error = FileSystem::read_link(DeprecatedString::formatted("/proc/{}/fd/{}", getpid(), fd));
EXPECT(!suid_path_or_error.is_error());
auto suid_path = suid_path_or_error.release_value();
auto suid_path = suid_path_or_error.release_value().to_deprecated_string();
EXPECT(suid_path.characters());
auto new_path = DeprecatedString::formatted("{}.renamed", suid_path);