Skip to content

Commit 5f57b19

Browse files
committed
Add test to test_files.c
1 parent b2ced9d commit 5f57b19

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

test/test_files.c

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ void test_tempfiles() {
163163
FILE *n = fopen("/dev/null", "w");
164164
printf("5 bytes to dev/null: %zu\n", fwrite(data, 1, 5, n));
165165
fclose(n);
166+
int res = fseek(n, 10, SEEK_CUR);
167+
printf("seek /dev/null: %d\n", res);
166168

167169
// Test file creation with O_TRUNC (regression test for #16784)
168170
const char *file_name = "test.out";

test/test_files.out

+1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ seeked=ata.
1212
seeked=ta.
1313
fscanfed: 10 - hello
1414
5 bytes to dev/null: 5
15+
seek /dev/null: 0
1516
ok.

0 commit comments

Comments
 (0)