summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/sordi.c2
-rw-r--r--wscript4
3 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index ec85fc9..77cde54 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ sord (0.13.1) unstable;
* Fix crash caused by multiple deletion of datatype nodes
* Fix compilation on compilers that do not support -pthread flag
* Fix minor memory leak in sordi
+ * Fix using sordi with stdin
* sord_validate: More extensive validation, including cardinality,
PlainLiteral, and someValuesFrom restrictions.
* This release does not break the ABI, but the semantics of iterators has
@@ -13,7 +14,7 @@ sord (0.13.1) unstable;
* Improve test coverage
* Upgrade to waf 1.8.14
- -- David Robillard <d@drobilla.net> Fri, 02 Oct 2015 21:13:32 -0400
+ -- David Robillard <d@drobilla.net> Sat, 03 Oct 2015 10:56:43 -0400
sord (0.12.2) stable;
diff --git a/src/sordi.c b/src/sordi.c
index 6ec5faf..257315a 100644
--- a/src/sordi.c
+++ b/src/sordi.c
@@ -159,7 +159,7 @@ main(int argc, char** argv)
if (a < argc) { // Base URI given on command line
base_uri_node = serd_node_new_uri_from_string(
(const uint8_t*)argv[a], NULL, &base_uri);
- } else if (from_file) { // Use input file URI
+ } else if (in_fd != stdin && from_file) { // Use input file URI
base_uri_node = serd_node_new_file_uri(in_path, NULL, &base_uri, false);
}
diff --git a/wscript b/wscript
index 3fb2cf4..fd52e29 100644
--- a/wscript
+++ b/wscript
@@ -279,6 +279,8 @@ def test(ctx):
'sordi_static -v > %s' % nul,
'sordi_static -h > %s' % nul,
'sordi_static -s "<foo> a <#Thingie> ." file:///test > %s' % nul,
+ 'echo "<s> <p> <o> ." | sordi_static - http://example.org/',
+ 'echo "<s> <p> <o> ." | sordi_static -o turtle - http://example.org/',
'sordi_static %s > %s' % (nul, nul)],
0, name='sordi-cmd-good')
@@ -293,6 +295,8 @@ def test(ctx):
'sordi_static -i illegal > %s' % nul,
'sordi_static -o illegal > %s' % nul,
'sordi_static -i turtle > %s' % nul,
+ 'sordi_static -i ntriples > %s' % nul,
+ 'echo "<s> <p> <o> ." | sordi_static -',
'sordi_static /no/such/file > %s' % nul],
1, name='sordi-cmd-bad')