diff options
Diffstat (limited to 'test/run_test_suite.py')
-rwxr-xr-x | test/run_test_suite.py | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py index e4f5a79a..2d52e576 100755 --- a/test/run_test_suite.py +++ b/test/run_test_suite.py @@ -47,6 +47,13 @@ def log_error(message): sys.stderr.write(message) +def test_osyntax_options(osyntax): + if osyntax.lower() == "ntriples" or osyntax.lower() == "nquads": + return ["-a"] + + return [] + + def test_thru( base_uri, path, @@ -81,16 +88,21 @@ def test_thru( ] ) - thru_cmd = command_prefix + [ - "-i", - isyntax, - "-o", - osyntax, - "-c", - "foo", - out_path, - base_uri, - ] + thru_cmd = ( + command_prefix + + test_osyntax_options(osyntax) + + [ + "-i", + isyntax, + "-o", + osyntax, + "-c", + "foo", + "-a", + out_path, + base_uri, + ] + ) with open(out_path, "wb") as out: subprocess.run(out_cmd, check=True, stdout=out) @@ -232,7 +244,7 @@ def test_suite( test_name = os.path.basename(test_uri_path) test_path = os.path.join(test_dir, test_name) - command = command_prefix + ["-f", test_path, test_uri] + command = command_prefix + ["-a"] + [test_path, test_uri] command_string = " ".join(shlex.quote(c) for c in command) out_filename = os.path.join(out_test_dir, test_name + ".out") |