aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/uri.c6
-rwxr-xr-xwafbin91015 -> 91475 bytes
-rw-r--r--wscript7
3 files changed, 11 insertions, 2 deletions
diff --git a/src/uri.c b/src/uri.c
index d329c4b5..fbd9e03d 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -364,8 +364,10 @@ serd_uri_serialise(const SerdURI* uri, SerdSink sink, void* stream)
} while (up > 0 && (--base_last > uri->path_base.buf));
// Write base URI prefix
- const size_t base_len = base_last - uri->path_base.buf + 1;
- WRITE(uri->path_base.buf, base_len);
+ if (*base_last == '/') {
+ const size_t base_len = base_last - uri->path_base.buf + 1;
+ WRITE(uri->path_base.buf, base_len);
+ }
} else {
// Relative path is just query or fragment, append to base URI
diff --git a/waf b/waf
index f532f38d..907b9847 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index bdf0360a..b3f4337a 100644
--- a/wscript
+++ b/wscript
@@ -316,6 +316,13 @@ def test(ctx):
autowaf.run_tests(ctx, APPNAME, ['serd_test'], dirs=['.'])
+ autowaf.run_tests(ctx, APPNAME, [
+ 'serdi_static -o turtle %s/tests/base.ttl "base.ttl" > tests/base.ttl.out' % srcdir],
+ 0, name='base')
+
+ if not file_equals('%s/tests/base.ttl' % srcdir, 'tests/base.ttl.out'):
+ Logs.pprint('RED', 'FAIL: build/tests/base.ttl.out is incorrect')
+
nul = os.devnull
autowaf.run_tests(ctx, APPNAME, [
'serdi_static file://%s/tests/manifest.ttl > %s' % (srcdir, nul),