aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/meson.build9
-rwxr-xr-xtest/run_suite.py9
-rw-r--r--test/test_writer.c2
3 files changed, 14 insertions, 6 deletions
diff --git a/test/meson.build b/test/meson.build
index b01dde81..08fb3200 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -197,6 +197,7 @@ simple_command_tests = {
['-r'],
['-s', '<foo> a <Bar> .'],
['-s'],
+ ['-w'],
['-z'],
],
'good': [
@@ -351,6 +352,14 @@ if is_variable('serd_pipe')
env: test_env,
suite: 'io',
)
+ test(
+ 'missing_output',
+ serd_pipe,
+ args: ['-o', '/does/not/exist.ttl', serd_ttl],
+ env: test_env,
+ should_fail: true,
+ suite: 'io',
+ )
if host_machine.system() == 'linux'
test(
diff --git a/test/run_suite.py b/test/run_suite.py
index ffc616a3..cee9d88e 100755
--- a/test/run_suite.py
+++ b/test/run_suite.py
@@ -41,13 +41,12 @@ def run_eval_test(command, in_path, good_path, out_path):
"""Run a positive eval test and return whether the output matches."""
syntax = util.syntax_from_path(out_path)
- command = command + ["-o", syntax, in_path]
-
- with subprocess.Popen(command, stdout=PIPE, encoding="utf-8") as proc:
- out = list(proc.stdout)
+ command = command + ["-o", syntax, "-w", out_path, in_path]
+ subprocess.check_call(command, encoding="utf-8")
with open(good_path, "r", encoding="utf-8") as good:
- return util.lines_equal(list(good), out, good_path, out_path)
+ with open(out_path, "r", encoding="utf-8") as out:
+ return util.lines_equal(list(good), list(out), good_path, out_path)
def run_positive_test(command, in_path):
diff --git a/test/test_writer.c b/test/test_writer.c
index 655f79e9..47350031 100644
--- a/test/test_writer.c
+++ b/test/test_writer.c
@@ -417,7 +417,7 @@ test_write_bad_uri(void)
SerdBuffer buffer = {NULL, 0};
SerdOutputStream output = serd_open_output_buffer(&buffer);
SerdWriter* writer =
- serd_writer_new(world, SERD_NTRIPLES, 0U, env, &output, 1);
+ serd_writer_new(world, SERD_NTRIPLES, 0U, env, &output, 1U);
assert(writer);