diff options
author | David Robillard <d@drobilla.net> | 2008-12-13 19:10:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-12-13 19:10:20 +0000 |
commit | 295faf6ffa2df8adc0a78f12906d2f9e1595641e (patch) | |
tree | 2b6f143ce5cb7bc7c7e189eb054c3e65009477fc /src | |
parent | edbffff51f8769c58b977e6d860501928d234f80 (diff) | |
download | lilv-295faf6ffa2df8adc0a78f12906d2f9e1595641e.tar.gz lilv-295faf6ffa2df8adc0a78f12906d2f9e1595641e.tar.bz2 lilv-295faf6ffa2df8adc0a78f12906d2f9e1595641e.zip |
Test (and fix) slv2_plugin_get_value_for_subject: 94.3% coverage
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1867 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugin.c b/src/plugin.c index 0260a02..7b5845b 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -409,14 +409,14 @@ slv2_plugin_get_value(SLV2Plugin p, if (predicate->type == SLV2_VALUE_URI) { query = slv2_strjoin( - "PREFIX slv2predicate: <", slv2_value_as_string(predicate), ">", - "SELECT DISTINCT ?value WHERE { \n" - "<> slv2predicate: ?value \n" + "PREFIX slv2predicate: <", slv2_value_as_string(predicate), ">\n", + "SELECT DISTINCT ?value WHERE {\n" + "<> slv2predicate: ?value .\n" "}\n", NULL); } else if (predicate->type == SLV2_VALUE_QNAME) { query = slv2_strjoin( - "SELECT DISTINCT ?value WHERE { \n" - "<> ", slv2_value_as_string(predicate), " ?value \n" + "SELECT DISTINCT ?value WHERE {\n" + "<> ", slv2_value_as_string(predicate), " ?value .\n" "}\n", NULL); } else { fprintf(stderr, "slv2_plugin_get_value error: " @@ -488,14 +488,14 @@ slv2_plugin_get_value_for_subject(SLV2Plugin p, if (predicate->type == SLV2_VALUE_URI) { query = slv2_strjoin( - "PREFIX slv2predicate: <", predicate, ">", - "SELECT DISTINCT ?value WHERE { \n", - subject_token, " slv2predicate: ?value \n" + "PREFIX slv2predicate: <", slv2_value_as_string(predicate), ">\n", + "SELECT DISTINCT ?value WHERE {\n", + subject_token, " slv2predicate: ?value .\n" "}\n", NULL); - } else if (predicate->type == SLV2_VALUE_URI) { + } else if (predicate->type == SLV2_VALUE_QNAME) { query = slv2_strjoin( - "SELECT DISTINCT ?value WHERE { \n", - subject_token, " ", predicate, " ?value \n" + "SELECT DISTINCT ?value WHERE {\n", + subject_token, " ", slv2_value_as_string(predicate), " ?value .\n" "}\n", NULL); } else { fprintf(stderr, "slv2_plugin_get_value error: " |