Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correct example names; modify results for datatype for language-tagge…
…d strings; if test w/ simple string results;
- Loading branch information
james
committed
Apr 8, 2012
1 parent
6c2076c
commit ba1f1a0
Showing
12 changed files
with
115 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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,65 @@ | ||
<?xml version="1.0"?> | ||
<sparql xmlns="http://www.w3.org/2005/sparql-results#"> | ||
<head> | ||
<variable name="o"/> | ||
<variable name="integer"/> | ||
</head> | ||
<results> | ||
<result> | ||
<binding name="o"> | ||
<literal>123</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal>def</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal xml:lang="fr">français</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal xml:lang="ja">日本語</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">true</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">7</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal>abc</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
<result> | ||
<binding name="o"> | ||
<literal xml:lang="en">english</literal> | ||
</binding> | ||
<binding name="integer"> | ||
<literal datatype="http://www.w3.org/2001/XMLSchema#boolean">false</literal> | ||
</binding> | ||
</result> | ||
</results> | ||
</sparql> |
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,32 @@ | ||
# coding: utf-8 | ||
# | ||
require 'spec_helper' | ||
|
||
# Auto-generated by build_w3c_tests.rb | ||
# | ||
# if01 | ||
# | ||
# This is a W3C test from the DAWG test suite: | ||
# http://www.w3.org/2009/sparql/docs/tests/data-sparql11/bindings/ | ||
# | ||
describe "W3C test" do | ||
context "functions" do | ||
before :all do | ||
@data = IO.read(File.dirname(__FILE__) + "/data2.ttl"); | ||
@query = IO.read(File.dirname(__FILE__) + "/if01.rq"); | ||
end | ||
|
||
example "if01", :w3c_status => 'approved', :string => 'simple' do | ||
|
||
graphs = {} | ||
graphs[:default] = { :data => @data, :format => :ttl} | ||
|
||
|
||
repository = 'functions-if01' | ||
expected = SPARQL::Client.parse_xml_bindings(IO.read(File.dirname(__FILE__) + "/if01-simple.srx")).map{|each| each.to_hash} | ||
|
||
sparql_query(:graphs => graphs, :query => @query, # unordered comparison in rspec is =~ | ||
:repository => repository, :form => :select).should =~ expected | ||
end | ||
end | ||
end |
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
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
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
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