Navigation Menu

Skip to content

Commit

Permalink
test for optional subject/object form
Browse files Browse the repository at this point in the history
  • Loading branch information
lisp committed Jun 28, 2013
1 parent 6aabbef commit 04d157b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
9 changes: 9 additions & 0 deletions suites/optional/optional-subject-object.rq
@@ -0,0 +1,9 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?mbox ?name ?nick
{
?x foaf:mbox ?mbox .
OPTIONAL { ?x foaf:name ?name } .
OPTIONAL { ?x foaf:nick ?nick } .
OPTIONAL { ?mbox <http://example.org/provider> ?provider } .
}
24 changes: 24 additions & 0 deletions suites/optional/optional-subject-object.sh
@@ -0,0 +1,24 @@
#! /bin/sh


# test provenance recording by checking the content of the related repository
# return 0 for success, otherwise 1
#
# environment :
# DYDRA_ACCOUNT : account name
# DYDRA_URL : host http url
# TEST_LIBRARY : support scripts

source ${TEST_LIBRARY}/setup-script


run-query jhacker/726-provenance ${CLEAR_QUERY} > result-$$.srj && \
test-result result-$$.srj provenance-1a-expected.srj && \
run-query jhacker/726-base provenance-1b.rq > result-$$.srj && \
test-result result-$$.srj provenance-1b-expected.srj && \
run-query jhacker/726-provenance ${COUNT_QUERY} > result-$$.srj && \
test-result result-$$.srj provenance-1c-expected.srj

STATUS=$?
exit $STATUS

1 change: 1 addition & 0 deletions suites/optional/optional-subject-object.srj
@@ -0,0 +1 @@
{ "head": {}, "boolean": true }
12 changes: 12 additions & 0 deletions suites/optional/optional-subject-object.ttl
@@ -0,0 +1,12 @@
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

_:a foaf:mbox <mailto:alice@example.net> .
_:a foaf:name 'Alice' .
_:a foaf:nick 'WhoMe?' .

_:b foaf:mbox <mailto:bert@example.net> .
_:b foaf:name 'Bert' .

_:e foaf:mbox <mailto:eve@example.net> .
_:e foaf:nick 'DuckSoup' .
<mailto:eve@example.net> <http://example.org/provider> "NSA" .

0 comments on commit 04d157b

Please sign in to comment.