aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-05-03 20:18:43 +0200
committerDavid Robillard <d@drobilla.net>2019-12-20 10:26:55 -0500
commitb9554abeb93b7c39db5beaa34c35bd0b2b332b03 (patch)
treefd1eb889abe26fbf695b2817d09ff88cea622e1c /wscript
parent27411951c2949ab08f9dee5b4a1e0870d005a427 (diff)
downloadserd-b9554abeb93b7c39db5beaa34c35bd0b2b332b03.tar.gz
serd-b9554abeb93b7c39db5beaa34c35bd0b2b332b03.tar.bz2
serd-b9554abeb93b7c39db5beaa34c35bd0b2b332b03.zip
Add input base URI option
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/wscript b/wscript
index eee245e6..a89327ab 100644
--- a/wscript
+++ b/wscript
@@ -316,7 +316,8 @@ def test_thru(check, base, path, check_path, flags, isyntax, osyntax, options=[]
'-i', isyntax,
'-o', isyntax,
'-p', 'foo',
- check.tst.src_path(path), base]
+ '-I', base,
+ check.tst.src_path(path)]
thru_path = path + '.thru'
thru_cmd = [serdi] + opts + osyntax_opts + [
@@ -324,8 +325,8 @@ def test_thru(check, base, path, check_path, flags, isyntax, osyntax, options=[]
'-o', osyntax,
'-c', 'foo',
'-a',
- out_path,
- base]
+ '-I', base,
+ out_path]
return (check(out_cmd, stdout=out_path, verbosity=0, name=out_path) and
check(thru_cmd, stdout=thru_path, verbosity=0, name=thru_path) and
@@ -440,9 +441,10 @@ def test_suite(ctx,
rel_action = os.path.join(os.path.relpath(srcdir), action)
uri = base_uri + os.path.basename(action)
command = ([serdi, '-a', '-o', osyntax] +
+ ['-I', uri] +
options +
flatten_options(next(extra_options_iter)) +
- [rel_action, uri])
+ [rel_action])
# Run strict test
if expected_return == 0:
@@ -520,7 +522,7 @@ def test(tst):
out_path = in_path + '.io'
check_path = '%s/tests/good/%s' % (srcdir, check_name)
- check([serdi, '-o', lang, '%s/%s' % (srcdir, in_path), in_path],
+ check([serdi, '-o', lang, '-I', in_path, '%s/%s' % (srcdir, in_path)],
stdout=out_path, name=in_name)
check.file_equals(check_path, out_path)
@@ -543,6 +545,7 @@ def test(tst):
check([serdi])
check([serdi, '/no/such/file'])
check([serdi, 'ftp://example.org/unsupported.ttl'])
+ check([serdi, '-I'])
check([serdi, '-c'])
check([serdi, '-i', 'illegal'])
check([serdi, '-i', 'turtle'])
@@ -557,6 +560,7 @@ def test(tst):
check([serdi, '-q', '%s/tests/bad/bad-base.ttl' % srcdir], stderr=None)
check([serdi, '-r'])
check([serdi, '-z'])
+ check([serdi] + ['%s/tests/bad/bad-base.ttl' % srcdir] * 2)
with tst.group('IoErrors', expected=1) as check:
check([serdi, '-e', 'file://%s/' % srcdir], name='Read directory')