summaryrefslogtreecommitdiff
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index c237d6d32..01b4dbab7 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -19,6 +19,7 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <linux/fs.h>
#include <math.h>
#include <stdio.h>
#include <sys/types.h>
@@ -2599,3 +2600,13 @@ TEST(STDIO_TEST, fread_with_locked_file) {
funlockfile(fp1);
fclose(fp1);
}
+
+TEST(STDIO_TEST, SEEK_macros) {
+ ASSERT_EQ(0, SEEK_SET);
+ ASSERT_EQ(1, SEEK_CUR);
+ ASSERT_EQ(2, SEEK_END);
+ ASSERT_EQ(3, SEEK_DATA);
+ ASSERT_EQ(4, SEEK_HOLE);
+ // So we'll notice if Linux grows another constant in <linux/fs.h>...
+ ASSERT_EQ(SEEK_MAX, SEEK_HOLE);
+}