aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/meson.build3
-rwxr-xr-xtest/run_test_suite.py34
2 files changed, 23 insertions, 14 deletions
diff --git a/test/meson.build b/test/meson.build
index 04c89731..8a76bbb6 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -205,9 +205,6 @@ if get_option('utils')
base_uri = w3c_base + syntax + 'Tests/'
args = ['--syntax', syntax, manifest, base_uri]
- if syntax == 'TriG'
- args += ['--', '-a']
- endif
test(syntax, run_test_suite,
args: script_args + args,
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index 3f637146..5f1d29c8 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)
@@ -255,7 +267,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")