aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript22
1 files changed, 17 insertions, 5 deletions
diff --git a/wscript b/wscript
index af81ebe4..38e5e00d 100644
--- a/wscript
+++ b/wscript
@@ -256,19 +256,31 @@ def earl_assertion(test, passed, asserter):
serdi = './serdi_static'
+def test_osyntax_options(osyntax):
+ if osyntax.lower() == 'ntriples' or osyntax.lower() == 'nquads':
+ return [['-a']]
+ return []
+
+def flatten_options(opts):
+ return [o for sublist in opts for o in sublist]
+
def test_thru(check, base, path, check_path, flags, isyntax, osyntax, opts=[]):
out_path = path + '.pass'
- out_cmd = [serdi] + opts + [f for sublist in flags for f in sublist] + [
+ opts += flatten_options(test_osyntax_options(osyntax))
+ flags = flatten_options(flags)
+ osyntax_opts = [f for sublist in test_osyntax_options(osyntax) for f in sublist]
+ out_cmd = [serdi] + opts + flags + [
'-i', isyntax,
'-o', isyntax,
'-p', 'foo',
check.tst.src_path(path), base]
thru_path = path + '.thru'
- thru_cmd = [serdi] + opts + [
+ thru_cmd = [serdi] + opts + osyntax_opts + [
'-i', isyntax,
'-o', osyntax,
'-c', 'foo',
+ '-a',
out_path,
base]
@@ -335,7 +347,7 @@ def test_suite(ctx, base_uri, testdir, report, isyntax, options=[]):
asserter = 'http://drobilla.net/drobilla#me'
def run_tests(test_class, tests, expected_return):
- thru_flags = [['-e'], ['-f'], ['-b'], ['-r', 'http://example.org/']]
+ thru_flags = [['-e'], ['-b'], ['-r', 'http://example.org/']]
thru_options = []
for n in range(len(thru_flags) + 1):
thru_options += list(itertools.combinations(thru_flags, n))
@@ -349,7 +361,7 @@ def test_suite(ctx, base_uri, testdir, report, isyntax, options=[]):
action = os.path.join('tests', testdir, os.path.basename(action_node))
rel_action = os.path.join(os.path.relpath(srcdir), action)
uri = base_uri + os.path.basename(action)
- command = [serdi] + options + ['-f', rel_action, uri]
+ command = [serdi, '-a'] + options + [rel_action, uri]
# Run strict test
if expected_return == 0:
@@ -474,7 +486,7 @@ def test(tst):
test_suite(tst, w3c_base + 'NQuadsTests/',
'NQuadsTests', report, 'NQuads')
test_suite(tst, w3c_base + 'TriGTests/',
- 'TriGTests', report, 'Trig', ['-a'])
+ 'TriGTests', report, 'Trig')
def posts(ctx):
path = str(ctx.path.abspath())