125 Star 0 Fork 12

src-openEuler/redland

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix-test-failed.patch 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
starlet_dx 提交于 2024-07-12 11:30 . Fix test failed
diff -Naur a/src/rdf_parser.c b/src/rdf_parser.c
--- a/src/rdf_parser.c 2024-07-12 11:25:43.699551420 +0800
+++ b/src/rdf_parser.c 2024-07-12 11:25:57.519551420 +0800
@@ -1010,7 +1010,7 @@
" <dc:creator>Dave Beckett</dc:creator>\n" \
" <dc:description>The generic home page of Dave Beckett.</dc:description>\n" \
" </rdf:Description>\n" \
-"</rdf:RDF>"
+"</rdf:RDF>\n"
#define NTRIPLES_CONTENT \
"<http://purl.org/net/dajobe/> <http://purl.org/dc/elements/1.1/creator> \"Dave Beckett\" .\n" \
@@ -1138,11 +1138,11 @@
}
+ fprintf(stderr, "%s: Adding %s string content as stream\n", program, type);
stream = librdf_parser_parse_string_as_stream(parser,
file_content[testi],
uris[testi]);
if(!stream) {
- fprintf(stderr, "%s: Adding %s string content as stream\n", program, type);
fprintf(stderr, "%s: Failed to parse RDF from string %d as stream\n",
program, testi);
failures++;
@@ -1161,6 +1161,10 @@
goto tidy_test;
}
+ if (parser) {
+ librdf_free_parser(parser);
+ }
+ parser = librdf_new_parser(world, type, NULL, NULL);
fprintf(stderr, "%s: Adding %s as iostream, as stream\n", program, type);
iostream = raptor_new_iostream_from_string(world->raptor_world_ptr,
@@ -1190,6 +1194,10 @@
goto tidy_test;
}
+ if (parser) {
+ librdf_free_parser(parser);
+ }
+ parser = librdf_new_parser(world, type, NULL, NULL);
fprintf(stderr, "%s: Adding %s counted string content\n", program, type);
if(librdf_parser_parse_counted_string_into_model(parser,
@@ -1212,6 +1220,11 @@
goto tidy_test;
}
+ if (parser) {
+ librdf_free_parser(parser);
+ }
+ parser = librdf_new_parser(world, type, NULL, NULL);
+
fprintf(stderr, "%s: Adding %s string content\n", program, type);
if(librdf_parser_parse_string_into_model(parser,
@@ -1245,6 +1258,11 @@
}
/* test parsing iostream */
+ if (parser) {
+ librdf_free_parser(parser);
+ }
+ parser = librdf_new_parser(world, type, NULL, NULL);
+
fprintf(stderr, "%s: Adding %s iostream content\n", program, type);
iostream = raptor_new_iostream_from_string(world->raptor_world_ptr,
(void *)file_content[testi],
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/redland.git
[email protected]:src-openeuler/redland.git
src-openeuler
redland
redland
master

搜索帮助