-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for language and base direction
- Loading branch information
Showing
14 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PREFIX : <http://example/> | ||
|
||
:x1 :p "abc"@en . | ||
:x2 :p "abc"@en--ltr . | ||
:x3 :p "تصميم المواقع"@ar--rtl . | ||
:x4 :p 1 . | ||
:x5 :p <http://example/> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT ?x ?hasLang { | ||
?x :p ?object . | ||
BIND( hasLANG(?object) AS ?hasLang ) | ||
} ORDER BY ?x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ "head": { | ||
"vars": [ "x" , "hasLang" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x1" } , | ||
"hasLang": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x2" } , | ||
"hasLang": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x3" } , | ||
"hasLang": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x4" } , | ||
"hasLang": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x5" } , | ||
"hasLang": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT ?x ?hasLangDir { | ||
?x :p ?object . | ||
BIND( hasLANGDIR(?object) AS ?hasLangDir ) | ||
} ORDER BY ?x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ "head": { | ||
"vars": [ "x" , "hasLangDir" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x1" } , | ||
"hasLangDir": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x2" } , | ||
"hasLangDir": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x3" } , | ||
"hasLangDir": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x4" } , | ||
"hasLangDir": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x5" } , | ||
"hasLangDir": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT ?x ?lang { | ||
?x :p ?object . | ||
BIND( LANG(?object) AS ?lang ) | ||
} ORDER BY ?x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ "head": { | ||
"vars": [ "x" , "lang" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x1" } , | ||
"lang": { "type": "literal" , "value": "en" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x2" } , | ||
"lang": { "type": "literal" , "value": "en" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x3" } , | ||
"lang": { "type": "literal" , "value": "ar" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x4" } , | ||
"lang": { "type": "literal" , "value": "" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x5" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX : <http://example/> | ||
|
||
SELECT ?x ?langdir { | ||
?x :p ?object . | ||
BIND( LANGDIR(?object) AS ?langdir ) | ||
} ORDER BY ?x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ "head": { | ||
"vars": [ "x" , "langdir" ] | ||
} , | ||
"results": { | ||
"bindings": [ | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x1" } , | ||
"langdir": { "type": "literal" , "value": "" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x2" } , | ||
"langdir": { "type": "literal" , "value": "ltr" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x3" } , | ||
"langdir": { "type": "literal" , "value": "rtl" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x4" } , | ||
"langdir": { "type": "literal" , "value": "" } | ||
} , | ||
{ | ||
"x": { "type": "uri" , "value": "http://example/x5" } | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix : <https://w3c.github.io/rdf-tests/sparql/sparql12/grouping#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . | ||
@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> . | ||
@prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> . | ||
|
||
:manifest rdf:type mf:Manifest ; | ||
rdfs:label "Language and base direction" ; | ||
mf:entries | ||
( | ||
:haslang | ||
:haslangdir | ||
:lang | ||
:langdir | ||
:strlang | ||
:strlangdir | ||
) . | ||
|
||
|
||
:haslang rdf:type mf:QueryEvaluationTest ; | ||
mf:name "hasLANG"; | ||
rdfs:comment "Function hasLANG" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <haslang.rq> ; | ||
qt:data <data-lang.ttl> ] ; | ||
mf:result <haslang.srj> ; | ||
. | ||
|
||
:haslangdir rdf:type mf:QueryEvaluationTest ; | ||
mf:name "hasLANG"; | ||
rdfs:comment "Function hasLANGDIR" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <haslangdir.rq> ; | ||
qt:data <data-lang.ttl> ] ; | ||
mf:result <haslangdir.srj> ; | ||
. | ||
|
||
:lang rdf:type mf:QueryEvaluationTest ; | ||
mf:name "LANG"; | ||
rdfs:comment "Function LANG" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <lang.rq> ; | ||
qt:data <data-lang.ttl> ] ; | ||
mf:result <lang.srj> ; | ||
. | ||
|
||
:langdir rdf:type mf:QueryEvaluationTest ; | ||
mf:name "LANGDIR"; | ||
rdfs:comment "Function LANGDIR" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <langdir.rq> ; | ||
qt:data <data-lang.ttl> ] ; | ||
mf:result <langdir.srj> ; | ||
. | ||
|
||
:strlang rdf:type mf:QueryEvaluationTest ; | ||
mf:name "STRLANG"; | ||
rdfs:comment "Function STRLANG" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <strlang.rq> ; | ||
qt:data <data-empty.ttl> ] ; | ||
mf:result <strlang.srj> ; | ||
. | ||
|
||
:strlangdir rdf:type mf:QueryEvaluationTest ; | ||
mf:name "STRLANGDIR"; | ||
rdfs:comment "Function STRLANGDIR" ; | ||
dawgt:approval dawgt:Proposed ; | ||
mf:action | ||
[ qt:query <strlangdir.rq> ; | ||
qt:data <data-empty.ttl> ] ; | ||
mf:result <strlangdir.srj> ; | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT | ||
( STRLANG("abc", "en") AS ?term1 ) | ||
( STRLANG("abc", "") AS ?term2 ) | ||
( STRLANG(123, "en") AS ?term3 ) | ||
( STRLANG(<http:/example/x> , "en") AS ?term4 ) | ||
WHERE {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
( STRLANGDIR("abc", "en", "ltr") AS ?term1 ) | ||
( STRLANGDIR("abc", "en", "LTR") AS ?term2 ) | ||
( STRLANGDIR("قطة", "ar", "rtl") AS ?term3 ) | ||
( STRLANGDIR("abc", "en", "") AS ?term4 ) | ||
( STRLANGDIR("abc", "", "ltr") AS ?term5 ) | ||
( STRLANGDIR(123, "", "ltr") AS ?term6 ) | ||
( STRLANGDIR(<http:/example/x>, "en", "ltr") AS ?term7 ) | ||
WHERE {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters