From f3c95977f6c71b936e98f41c321265835c4fd623 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 25 Dec 2011 07:09:29 +0000 Subject: Near 100% branch coverage. git-svn-id: http://svn.drobilla.net/serd/trunk@277 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- tests/bad-base.ttl | 1 + tests/bad-datatype.ttl | 1 + tests/bad-eof-in-lang-suffix.ttl | 3 + tests/bad-eof-in-lang.ttl | 3 + tests/bad-eof-in-object-list.ttl | 2 + tests/bad-eof-in-object-list2.ttl | 2 + tests/bad-eof-in-predicate-list.ttl | 2 + tests/bad-hex-digit.ttl | 1 + tests/bad-list.ttl | 2 +- tests/bad-list2.ttl | 3 + tests/bad-namespace.ttl | 1 + tests/bad-object.ttl | 3 + tests/bad-object2.ttl | 3 + tests/bad-verb.ttl | 2 + tests/serd_test.c | 160 +++++++++++++++++++++++++++++++----- tests/test-backspace.out | 1 + tests/test-backspace.ttl | 3 +- tests/test-cr.out | 1 + tests/test-cr.ttl | 2 + tests/test-delete.out | 2 + tests/test-delete.ttl | 2 + tests/test-eof-at-page-end.out | 1 + tests/test-eof-at-page-end.ttl | 85 +++++++++++++++++++ tests/test-lang.out | 1 + tests/test-lang.ttl | 3 +- tests/test-list.out | 1 + tests/test-list.ttl | 1 + tests/test-no-spaces.out | 4 + tests/test-no-spaces.ttl | 3 + tests/test-num.out | 1 + tests/test-num.ttl | 1 + tests/test-prefix.out | 4 + tests/test-prefix.ttl | 6 +- tests/test-uri.out | 1 + tests/test-uri.ttl | 1 + tests/test-utf8-uri.out | 1 + tests/test-utf8-uri.ttl | 1 + 37 files changed, 291 insertions(+), 24 deletions(-) create mode 100644 tests/bad-base.ttl create mode 100644 tests/bad-datatype.ttl create mode 100644 tests/bad-eof-in-lang-suffix.ttl create mode 100644 tests/bad-eof-in-lang.ttl create mode 100644 tests/bad-eof-in-object-list.ttl create mode 100644 tests/bad-eof-in-object-list2.ttl create mode 100644 tests/bad-eof-in-predicate-list.ttl create mode 100644 tests/bad-hex-digit.ttl create mode 100644 tests/bad-list2.ttl create mode 100644 tests/bad-namespace.ttl create mode 100644 tests/bad-object.ttl create mode 100644 tests/bad-object2.ttl create mode 100644 tests/bad-verb.ttl create mode 100644 tests/test-cr.out create mode 100644 tests/test-cr.ttl create mode 100644 tests/test-delete.out create mode 100644 tests/test-delete.ttl create mode 100644 tests/test-eof-at-page-end.out create mode 100644 tests/test-eof-at-page-end.ttl create mode 100644 tests/test-list.out create mode 100644 tests/test-list.ttl create mode 100644 tests/test-no-spaces.out create mode 100644 tests/test-no-spaces.ttl create mode 100644 tests/test-utf8-uri.out create mode 100644 tests/test-utf8-uri.ttl (limited to 'tests') diff --git a/tests/bad-base.ttl b/tests/bad-base.ttl new file mode 100644 index 00000000..85421999 --- /dev/null +++ b/tests/bad-base.ttl @@ -0,0 +1 @@ +@base "I'm quite certain this is not a URI" . \ No newline at end of file diff --git a/tests/bad-datatype.ttl b/tests/bad-datatype.ttl new file mode 100644 index 00000000..0dd6018f --- /dev/null +++ b/tests/bad-datatype.ttl @@ -0,0 +1 @@ +<> "hello"^^"not-a-uri" . \ No newline at end of file diff --git a/tests/bad-eof-in-lang-suffix.ttl b/tests/bad-eof-in-lang-suffix.ttl new file mode 100644 index 00000000..8e3002cb --- /dev/null +++ b/tests/bad-eof-in-lang-suffix.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:comment "That ain't no language"@en-x \ No newline at end of file diff --git a/tests/bad-eof-in-lang.ttl b/tests/bad-eof-in-lang.ttl new file mode 100644 index 00000000..54db417f --- /dev/null +++ b/tests/bad-eof-in-lang.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:comment "That ain't no language"@a \ No newline at end of file diff --git a/tests/bad-eof-in-object-list.ttl b/tests/bad-eof-in-object-list.ttl new file mode 100644 index 00000000..9bbcd17a --- /dev/null +++ b/tests/bad-eof-in-object-list.ttl @@ -0,0 +1,2 @@ +@prefix eg: . +<> eg:p eg:o , \ No newline at end of file diff --git a/tests/bad-eof-in-object-list2.ttl b/tests/bad-eof-in-object-list2.ttl new file mode 100644 index 00000000..9186fb9f --- /dev/null +++ b/tests/bad-eof-in-object-list2.ttl @@ -0,0 +1,2 @@ +@prefix eg: . +<> eg:p eg:o ; eg:p1 eg:o2 , \ No newline at end of file diff --git a/tests/bad-eof-in-predicate-list.ttl b/tests/bad-eof-in-predicate-list.ttl new file mode 100644 index 00000000..eab5b05b --- /dev/null +++ b/tests/bad-eof-in-predicate-list.ttl @@ -0,0 +1,2 @@ +@prefix eg: . +<> eg:p eg:o ; \ No newline at end of file diff --git a/tests/bad-hex-digit.ttl b/tests/bad-hex-digit.ttl new file mode 100644 index 00000000..85816ced --- /dev/null +++ b/tests/bad-hex-digit.ttl @@ -0,0 +1 @@ + "\uABCG" . diff --git a/tests/bad-list.ttl b/tests/bad-list.ttl index 60e21351..5606658e 100644 --- a/tests/bad-list.ttl +++ b/tests/bad-list.ttl @@ -1 +1 @@ -<> ( \ No newline at end of file +<> , invalid . \ No newline at end of file diff --git a/tests/bad-list2.ttl b/tests/bad-list2.ttl new file mode 100644 index 00000000..b5242de2 --- /dev/null +++ b/tests/bad-list2.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:thing ( . \ No newline at end of file diff --git a/tests/bad-namespace.ttl b/tests/bad-namespace.ttl new file mode 100644 index 00000000..0dd78d33 --- /dev/null +++ b/tests/bad-namespace.ttl @@ -0,0 +1 @@ +@prefix eg: "what?" . \ No newline at end of file diff --git a/tests/bad-object.ttl b/tests/bad-object.ttl new file mode 100644 index 00000000..9fc6da18 --- /dev/null +++ b/tests/bad-object.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +eg:thing a four . diff --git a/tests/bad-object2.ttl b/tests/bad-object2.ttl new file mode 100644 index 00000000..9293d168 --- /dev/null +++ b/tests/bad-object2.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +eg:thing a fives . diff --git a/tests/bad-verb.ttl b/tests/bad-verb.ttl new file mode 100644 index 00000000..56a134f3 --- /dev/null +++ b/tests/bad-verb.ttl @@ -0,0 +1,2 @@ +@prefix a: . +a:thing x a:Thing . \ No newline at end of file diff --git a/tests/serd_test.c b/tests/serd_test.c index aca88127..7eb9a67e 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -82,7 +82,7 @@ main() }; const char* expt_test_strs[] = { - "02e18", "-5e019", "+8e20", "2E+34", "-5E-5", "8E0", "9e-0", "2e+0" + "02e18", "-5e019", "+8e20", "2E+34", "-5E-5", "8E0", "9e-0", " 2e+0" }; for (unsigned i = 0; i < sizeof(expt_test_nums) / sizeof(double); ++i) { @@ -99,11 +99,11 @@ main() // Test serd_node_new_decimal const double dbl_test_nums[] = { - 0.0, 42.0, .01, 8.0, 2.05, -16.00001, 5.000000005 + 0.0, 42.0, .01, 2.05, -16.00001, 5.000000005, 0.0000000001 }; const char* dbl_test_strs[] = { - "0.0", "42.0", "0.01", "8.0", "2.05", "-16.00001", "5.00000001" + "0.0", "42.0", "0.01", "2.05", "-16.00001", "5.00000001", "0.0" }; for (unsigned i = 0; i < sizeof(dbl_test_nums) / sizeof(double); ++i) { @@ -155,13 +155,19 @@ main() size_t n_bytes; SerdNodeFlags flags; - const size_t len = serd_strlen(str, &n_bytes, &flags); + size_t len = serd_strlen(str, &n_bytes, &flags); if (len != 5 || n_bytes != 7 || flags != (SERD_HAS_QUOTE|SERD_HAS_NEWLINE)) { fprintf(stderr, "Bad serd_strlen(%s) len=%zu n_bytes=%zu flags=%u\n", str, len, n_bytes, flags); return 1; } + len = serd_strlen(str, NULL, &flags); + if (len != 5) { + fprintf(stderr, "Bad serd_strlen(%s) len=%zu flags=%u\n", + str, len, flags); + return 1; + } // Test serd_strerror @@ -177,6 +183,7 @@ main() return 1; } } + msg = serd_strerror((SerdStatus)-1); // Test serd_uri_to_path @@ -200,6 +207,37 @@ main() fprintf(stderr, "Bad path %s for %s\n", serd_uri_to_path(uri), uri); return 1; } + uri = (const uint8_t*)"file:///c:awful/system"; + if (strcmp((const char*)serd_uri_to_path(uri), "/c:awful/system")) { + fprintf(stderr, "Bad path %s for %s\n", serd_uri_to_path(uri), uri); + return 1; + } + uri = (const uint8_t*)"file:///0/1"; + if (strcmp((const char*)serd_uri_to_path(uri), "/0/1")) { + fprintf(stderr, "Bad path %s for %s\n", serd_uri_to_path(uri), uri); + return 1; + } + + // Test serd_node_equals + + const uint8_t replacement_char_str[] = { 0xEF, 0xBF, 0xBD, 0 }; + SerdNode lhs = serd_node_from_string(SERD_LITERAL, replacement_char_str); + SerdNode rhs = serd_node_from_string(SERD_LITERAL, USTR("123")); + if (serd_node_equals(&lhs, &rhs)) { + fprintf(stderr, "%s == %s\n", lhs.buf, rhs.buf); + return 1; + } + + SerdNode qnode = serd_node_from_string(SERD_CURIE, USTR("foo:bar")); + if (serd_node_equals(&lhs, &qnode)) { + fprintf(stderr, "%s == %s\n", lhs.buf, qnode.buf); + return 1; + } + + if (!serd_node_equals(&lhs, &lhs)) { + fprintf(stderr, "%s != %s\n", lhs.buf, lhs.buf); + return 1; + } // Test serd_node_from_string @@ -211,13 +249,31 @@ main() return 1; } + // Test serd_node_new_uri_from_string + + SerdURI base_uri; + SerdNode base = serd_node_new_uri_from_string(USTR("http://example.org/"), + NULL, &base_uri); + SerdNode nil = serd_node_new_uri_from_string(NULL, &base_uri, NULL); + if (nil.type != SERD_URI || strcmp((const char*)nil.buf, (const char*)base.buf)) { + fprintf(stderr, "URI %s != base %s\n", nil.buf, base.buf); + return 1; + } + serd_node_free(&base); + serd_node_free(&nil); + // Test SerdEnv SerdNode u = serd_node_from_string(SERD_URI, USTR("http://example.org/foo")); SerdNode b = serd_node_from_string(SERD_CURIE, USTR("invalid")); - SerdNode c = serd_node_from_string(SERD_CURIE, USTR("eg:b")); + SerdNode c = serd_node_from_string(SERD_CURIE, USTR("eg.2:b")); SerdEnv* env = serd_env_new(NULL); - serd_env_set_prefix_from_strings(env, USTR("eg"), USTR("http://example.org/")); + serd_env_set_prefix_from_strings(env, USTR("eg.2"), USTR("http://example.org/")); + + if (!serd_env_set_base_uri(env, &node)) { + fprintf(stderr, "Set base URI to %s\n", node.buf); + return 1; + } SerdChunk prefix, suffix; if (!serd_env_expand(env, &b, &prefix, &suffix)) { @@ -225,6 +281,12 @@ main() return 1; } + SerdNode xnode = serd_env_expand_node(env, &node); + if (!serd_node_equals(&xnode, &SERD_NODE_NULL)) { + fprintf(stderr, "Expanded %s to %s\n", c.buf, xnode.buf); + return 1; + } + SerdNode xu = serd_env_expand_node(env, &u); if (strcmp((const char*)xu.buf, "http://example.org/foo")) { fprintf(stderr, "Expanded %s to %s\n", c.buf, xu.buf); @@ -232,6 +294,13 @@ main() } serd_node_free(&xu); + SerdNode badpre = serd_node_from_string(SERD_CURIE, USTR("hm:what")); + SerdNode xbadpre = serd_env_expand_node(env, &badpre); + if (!serd_node_equals(&xbadpre, &SERD_NODE_NULL)) { + fprintf(stderr, "Expanded invalid curie %s\n", badpre.buf); + return 1; + } + SerdNode xc = serd_env_expand_node(env, &c); if (strcmp((const char*)xc.buf, "http://example.org/b")) { fprintf(stderr, "Expanded %s to %s\n", c.buf, xc.buf); @@ -251,13 +320,20 @@ main() } int n_prefixes = 0; - serd_env_set_prefix_from_strings(env, USTR("eg"), USTR("http://example.org/")); + serd_env_set_prefix_from_strings(env, USTR("eg.2"), USTR("http://example.org/")); serd_env_foreach(env, count_prefixes, &n_prefixes); if (n_prefixes != 1) { fprintf(stderr, "Bad prefix count %d\n", n_prefixes); return 1; } + SerdNode shorter_uri = serd_node_from_string(SERD_URI, USTR("urn:foo")); + SerdNode prefix_name; + if (serd_env_qualify(env, &shorter_uri, &prefix_name, &suffix)) { + fprintf(stderr, "Qualified %s\n", shorter_uri.buf); + return 1; + } + // Test SerdReader and SerdWriter const char* path = tmpnam(NULL); @@ -277,6 +353,19 @@ main() return 1; } + serd_writer_chop_blank_prefix(writer, USTR("tmp")); + serd_writer_chop_blank_prefix(writer, NULL); + + if (!serd_writer_set_base_uri(writer, &lit)) { + fprintf(stderr, "Set base URI to %s\n", lit.buf); + return 1; + } + + if (!serd_writer_set_prefix(writer, &lit, &lit)) { + fprintf(stderr, "Set prefix %s to %s\n", lit.buf, lit.buf); + return 1; + } + if (!serd_writer_end_anon(writer, NULL)) { fprintf(stderr, "Ended non-existent anonymous node\n"); return 1; @@ -288,20 +377,43 @@ main() SerdNode o = serd_node_from_string(SERD_LITERAL, buf); // Write 3 invalid statements (should write nothing) - if (!serd_writer_write_statement(writer, 0, NULL, - &s, &p, NULL, NULL, NULL)) { - fprintf(stderr, "Successfully wrote junk statement 1\n"); - return 1; - } - if (!serd_writer_write_statement(writer, 0, NULL, - &s, &p, &SERD_NODE_NULL, NULL, NULL)) { - fprintf(stderr, "Successfully wrote junk statement 1\n"); + const SerdNode* junk[][5] = { { &s, &p, NULL, NULL, NULL }, + { &s, NULL, &o, NULL, NULL }, + { NULL, &p, &o, NULL, NULL }, + { &s, &p, &SERD_NODE_NULL, NULL, NULL }, + { &s, &SERD_NODE_NULL, &o, NULL, NULL }, + { &SERD_NODE_NULL, &p, &o, NULL, NULL }, + { &s, &o, &o, NULL, NULL }, + { &o, &p, &o, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } }; + for (unsigned i = 0; i < sizeof(junk) / (sizeof(SerdNode*) * 5); ++i) { + if (!serd_writer_write_statement( + writer, 0, NULL, + junk[i][0], junk[i][1], junk[i][2], junk[i][3], junk[i][4])) { + fprintf(stderr, "Successfully wrote junk statement %d\n", i); return 1; + } } - if (!serd_writer_write_statement(writer, 0, NULL, - &s, &o, &o, NULL, NULL)) { - fprintf(stderr, "Successfully wrote junk statement 3\n"); - return 1; + + const SerdNode t = serd_node_from_string(SERD_URI, USTR("urn:Type")); + const SerdNode l = serd_node_from_string(SERD_LITERAL, USTR("en")); + const SerdNode* good[][5] = { { &s, &p, &o, NULL, NULL }, + { &s, &p, &o, &SERD_NODE_NULL, &SERD_NODE_NULL }, + { &s, &p, &o, &t, NULL }, + { &s, &p, &o, NULL, &l }, + { &s, &p, &o, &t, &l }, + { &s, &p, &o, &t, &SERD_NODE_NULL }, + { &s, &p, &o, &SERD_NODE_NULL, &l }, + { &s, &p, &o, NULL, &SERD_NODE_NULL }, + { &s, &p, &o, &SERD_NODE_NULL, NULL }, + { &s, &p, &o, &SERD_NODE_NULL, NULL } }; + for (unsigned i = 0; i < sizeof(good) / (sizeof(SerdNode*) * 5); ++i) { + if (serd_writer_write_statement( + writer, 0, NULL, + good[i][0], good[i][1], good[i][2], good[i][3], good[i][4])) { + fprintf(stderr, "Failed to write good statement %d\n", i); + return 1; + } } // Write 1 statement with bad UTF-8 (should be replaced) @@ -334,6 +446,9 @@ main() return 1; } + serd_reader_add_blank_prefix(reader, USTR("tmp")); + serd_reader_add_blank_prefix(reader, NULL); + if (!serd_reader_read_file(reader, USTR("http://notafile"))) { fprintf(stderr, "Apparently read an http URI\n"); return 1; @@ -348,11 +463,16 @@ main() return 1; } - if (*n_statements != 2) { + if (*n_statements != 12) { fprintf(stderr, "Bad statement count %d\n", *n_statements); return 1; } + if (!serd_reader_read_string(reader, USTR("This isn't Turtle at all."))) { + fprintf(stderr, "Parsed invalid string successfully.\n"); + return 1; + } + serd_reader_free(reader); fclose(fd); diff --git a/tests/test-backspace.out b/tests/test-backspace.out index ae8d3678..ad4806cf 100644 --- a/tests/test-backspace.out +++ b/tests/test-backspace.out @@ -1 +1,2 @@ "\u0008" . + "\uFFFD" . diff --git a/tests/test-backspace.ttl b/tests/test-backspace.ttl index 0e695a88..07375d76 100644 --- a/tests/test-backspace.ttl +++ b/tests/test-backspace.ttl @@ -1 +1,2 @@ - "\u0008" . \ No newline at end of file + "\u0008" . + "" . \ No newline at end of file diff --git a/tests/test-cr.out b/tests/test-cr.out new file mode 100644 index 00000000..aea1655b --- /dev/null +++ b/tests/test-cr.out @@ -0,0 +1 @@ + . diff --git a/tests/test-cr.ttl b/tests/test-cr.ttl new file mode 100644 index 00000000..5410648a --- /dev/null +++ b/tests/test-cr.ttl @@ -0,0 +1,2 @@ +#Test a . + diff --git a/tests/test-delete.out b/tests/test-delete.out new file mode 100644 index 00000000..41ac8062 --- /dev/null +++ b/tests/test-delete.out @@ -0,0 +1,2 @@ + "\u007F" . + "\u007F" . diff --git a/tests/test-delete.ttl b/tests/test-delete.ttl new file mode 100644 index 00000000..4bc97060 --- /dev/null +++ b/tests/test-delete.ttl @@ -0,0 +1,2 @@ + "\u007F" . + "" . diff --git a/tests/test-eof-at-page-end.out b/tests/test-eof-at-page-end.out new file mode 100644 index 00000000..64d24586 --- /dev/null +++ b/tests/test-eof-at-page-end.out @@ -0,0 +1 @@ + "\n0123456789012345678901234567890123456789\n\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567890123456789012345678901234567890123456789\n01234567" . diff --git a/tests/test-eof-at-page-end.ttl b/tests/test-eof-at-page-end.ttl new file mode 100644 index 00000000..d6d9af26 --- /dev/null +++ b/tests/test-eof-at-page-end.ttl @@ -0,0 +1,85 @@ + """ +0123456789012345678901234567890123456789 + +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 + +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 + +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 + +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567890123456789012345678901234567890123456789 +01234567""" . \ No newline at end of file diff --git a/tests/test-lang.out b/tests/test-lang.out index c36dda42..61daecb3 100644 --- a/tests/test-lang.out +++ b/tests/test-lang.out @@ -2,3 +2,4 @@ "Howdy"@en-us . "Bonjour"@fr . "Guten Tag"@de-latn-de . + "HEY MAN"@en-crazy0place . diff --git a/tests/test-lang.ttl b/tests/test-lang.ttl index f7c2727f..b0616475 100644 --- a/tests/test-lang.ttl +++ b/tests/test-lang.ttl @@ -3,4 +3,5 @@ :thing :greeting "Hello"@en ; :greeting "Howdy"@en-us ; :greeting "Bonjour"@fr ; - :greeting "Guten Tag"@de-latn-de . + :greeting "Guten Tag"@de-latn-de ; + :greeting "HEY MAN"@en-crazy0place . diff --git a/tests/test-list.out b/tests/test-list.out new file mode 100644 index 00000000..3a27a5a6 --- /dev/null +++ b/tests/test-list.out @@ -0,0 +1 @@ + . diff --git a/tests/test-list.ttl b/tests/test-list.ttl new file mode 100644 index 00000000..7f4c7699 --- /dev/null +++ b/tests/test-list.ttl @@ -0,0 +1 @@ +() a . \ No newline at end of file diff --git a/tests/test-no-spaces.out b/tests/test-no-spaces.out new file mode 100644 index 00000000..3619a5f0 --- /dev/null +++ b/tests/test-no-spaces.out @@ -0,0 +1,4 @@ + . + . + . + . diff --git a/tests/test-no-spaces.ttl b/tests/test-no-spaces.ttl new file mode 100644 index 00000000..88171e71 --- /dev/null +++ b/tests/test-no-spaces.ttl @@ -0,0 +1,3 @@ +@prefix eg: . +eg:s eg:p eg:o;eg:p2 eg:o2,eg:o3 . +eg:s a . \ No newline at end of file diff --git a/tests/test-num.out b/tests/test-num.out index 2502580b..54263d46 100644 --- a/tests/test-num.out +++ b/tests/test-num.out @@ -7,3 +7,4 @@ "1.58490e-05"^^ . "1.58490e+05"^^ . "1.58490e05"^^ . + "1.58490E05"^^ . diff --git a/tests/test-num.ttl b/tests/test-num.ttl index 54a425ac..68ad290b 100644 --- a/tests/test-num.ttl +++ b/tests/test-num.ttl @@ -9,3 +9,4 @@ eg:thing eg:num -.6 . eg:thing eg:num 1.58490e-05 . eg:thing eg:num 1.58490e+05 . eg:thing eg:num 1.58490e05 . +eg:thing eg:num 1.58490E05 . diff --git a/tests/test-prefix.out b/tests/test-prefix.out index 9e166588..bcfdd4b6 100644 --- a/tests/test-prefix.out +++ b/tests/test-prefix.out @@ -1,2 +1,6 @@ . . + . + . + . + . diff --git a/tests/test-prefix.ttl b/tests/test-prefix.ttl index a1d22122..f79896cb 100644 --- a/tests/test-prefix.ttl +++ b/tests/test-prefix.ttl @@ -1,4 +1,8 @@ @prefix eg: . a . - a . \ No newline at end of file + a . + a . + a . + a . + a . diff --git a/tests/test-uri.out b/tests/test-uri.out index 8c984f79..8fd5dd87 100644 --- a/tests/test-uri.out +++ b/tests/test-uri.out @@ -35,6 +35,7 @@ . . . + . . . . diff --git a/tests/test-uri.ttl b/tests/test-uri.ttl index cbc699ab..8e4f5102 100644 --- a/tests/test-uri.ttl +++ b/tests/test-uri.ttl @@ -52,6 +52,7 @@ # Additional tests for Serd owl:sameAs . + owl:sameAs . owl:sameAs . owl:sameAs . owl:sameAs . diff --git a/tests/test-utf8-uri.out b/tests/test-utf8-uri.out new file mode 100644 index 00000000..b8a73a88 --- /dev/null +++ b/tests/test-utf8-uri.out @@ -0,0 +1 @@ + . diff --git a/tests/test-utf8-uri.ttl b/tests/test-utf8-uri.ttl new file mode 100644 index 00000000..51f26ff2 --- /dev/null +++ b/tests/test-utf8-uri.ttl @@ -0,0 +1 @@ + a . \ No newline at end of file -- cgit v1.2.1