summaryrefslogtreecommitdiff
path: root/Userland/test_io.cpp
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-06-16 22:01:50 +0300
committerAndreas Kling <kling@serenityos.org>2020-06-17 15:02:03 +0200
commiteb7af001526a93b2aebf80cac148acceca6e579f (patch)
tree6b62ce01d69e66ec13806a14995f3f70c9b90374 /Userland/test_io.cpp
parentd89843f96fa7673f409bb8c33e043e2355b257f1 (diff)
downloadserenity-eb7af001526a93b2aebf80cac148acceca6e579f.zip
Userland: Use Core::File::read_link()
Diffstat (limited to 'Userland/test_io.cpp')
-rw-r--r--Userland/test_io.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/test_io.cpp b/Userland/test_io.cpp
index d469edc58d..6aa104c308 100644
--- a/Userland/test_io.cpp
+++ b/Userland/test_io.cpp
@@ -27,6 +27,7 @@
#include <AK/Assertions.h>
#include <AK/LogStream.h>
#include <AK/Types.h>
+#include <LibCore/File.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
@@ -212,9 +213,8 @@ void test_unlink_symlink()
ASSERT_NOT_REACHED();
}
- char buffer[PATH_MAX];
- rc = readlink("/tmp/linky", buffer, sizeof(buffer));
- ASSERT(rc == strlen("/proc/2/foo"));
+ auto target = Core::File::read_link("/tmp/linky");
+ ASSERT(target == "/proc/2/foo");
rc = unlink("/tmp/linky");
if (rc < 0) {