Skip to content

Commit 0ada290

Browse files
committed
Add test to test_files.c
1 parent b2ced9d commit 0ada290

File tree

5 files changed

+3
-26
lines changed

5 files changed

+3
-26
lines changed

test/other/test_seek_dev_null.c

-21
This file was deleted.

test/other/test_seek_dev_null.out

-2
This file was deleted.

test/test_files.c

+2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ void test_tempfiles() {
162162
char data[5] = { 10, 30, 20, 11, 88 };
163163
FILE *n = fopen("/dev/null", "w");
164164
printf("5 bytes to dev/null: %zu\n", fwrite(data, 1, 5, n));
165+
int res = fseek(n, 10, SEEK_CUR);
166+
printf("seek /dev/null: %d\n", res);
165167
fclose(n);
166168

167169
// Test file creation with O_TRUNC (regression test for #16784)

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.

test/test_other.py

-3
Original file line numberDiff line numberDiff line change
@@ -15295,6 +15295,3 @@ def test_fp16(self, opts):
1529515295

1529615296
def test_embool(self):
1529715297
self.do_other_test('test_embool.c')
15298-
15299-
def test_seek_dev_null(self):
15300-
self.do_other_test('test_seek_dev_null.c')

0 commit comments

Comments
 (0)