aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reader.c3
-rw-r--r--wscript6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/reader.c b/src/reader.c
index a0d74642..b1d0279f 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1407,8 +1407,7 @@ serd_reader_read_file(SerdReader me, FILE* file, const uint8_t* name)
memset(me->read_buf, '\0', READ_BUF_LEN * 2);
me->read_buf += READ_BUF_LEN;
- page(me);
- const bool ret = read_turtleDoc(me);
+ const bool ret = !page(me) || read_turtleDoc(me);
free(me->read_buf - READ_BUF_LEN);
me->fd = 0;
diff --git a/wscript b/wscript
index c41a99c3..67707584 100644
--- a/wscript
+++ b/wscript
@@ -128,7 +128,8 @@ def test(ctx):
'./serdi_static file://../tests/manifest.ttl > /dev/null',
'./serdi_static ../tests/UTF-8.ttl > /dev/null',
'./serdi_static -v > /dev/null',
- './serdi_static -s "<foo> a <#Thingie> ." > /dev/null'],
+ './serdi_static -s "<foo> a <#Thingie> ." > /dev/null',
+ './serdi_static /dev/null > /dev/null'],
0, name='serdi-cmd-good')
autowaf.run_tests(ctx, APPNAME,
@@ -136,7 +137,8 @@ def test(ctx):
'./serdi_static ftp://example.org/unsupported.ttl > /dev/null',
'./serdi_static -o > /dev/null',
'./serdi_static -z > /dev/null',
- './serdi_static -o illegal > /dev/null'],
+ './serdi_static -o illegal > /dev/null',
+ './serdi_static /no/such/file > /dev/null'],
1, name='serdi-cmd-bad')
commands = []