Skip to content

Instantly share code, notes, and snippets.

@antoniogarrote
Created August 5, 2011 08:36
Show Gist options
  • Select an option

  • Save antoniogarrote/1127139 to your computer and use it in GitHub Desktop.

Select an option

Save antoniogarrote/1127139 to your computer and use it in GitHub Desktop.
exports.testExport1 = function(test) {
Store.create(function(store) {
store.load('remote', 'http://dbpedia.org/resource/Tim_Berners-Lee', 'http://test.com/graph-to-export',
function(success, result) {
var graph = store.graph('http://test.com/graph-to-export', function(success, graph){
var n3 = "";
graph.forEach(function(triple) {
n3 = n3 + triple.toString();
});
var result = TurtleParser.parser.parse(n3);
test.ok(result.length === 162);
// an easier way
test.ok(graph.toNT() == n3);
test.done();
});
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment