From fb30a102ee544acf21d387fc99a31111262b6209 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Feb 2024 11:01:37 -0500 Subject: Add tests with as many rules as possible in a single document --- test/extra/good/manifest.ttl | 12 ++++++ test/extra/good/test-nq-syntax-all-rules.nq | 7 ++++ test/extra/good/test-nt-syntax-all-rules.nt | 7 ++++ test/extra/good/test-trig-syntax-all-rules.trig | 56 +++++++++++++++++++++++++ test/extra/good/test-ttl-syntax-all-rules.ttl | 26 ++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 test/extra/good/test-nq-syntax-all-rules.nq create mode 100644 test/extra/good/test-nt-syntax-all-rules.nt create mode 100644 test/extra/good/test-trig-syntax-all-rules.trig create mode 100644 test/extra/good/test-ttl-syntax-all-rules.ttl (limited to 'test/extra/good') diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl index efef7f54..befe9451 100644 --- a/test/extra/good/manifest.ttl +++ b/test/extra/good/manifest.ttl @@ -31,12 +31,14 @@ <#test-long-utf8> <#test-no-spaces> <#test-non-curie-uri> + <#test-nq-syntax-all-rules> <#test-nq-syntax-dot-end> <#test-nq-syntax-eof-after-blank-dot> <#test-nq-syntax-eol-cr> <#test-nq-syntax-eol-crlf> <#test-nq-syntax-eol-lf> <#test-nq-syntax-eol-lfcr> + <#test-nt-syntax-all-rules> <#test-nt-syntax-blank-dot> <#test-nt-syntax-dot-end> <#test-nt-syntax-eof-after-blank-dot> @@ -209,6 +211,11 @@ mf:action ; mf:name "test-nq-syntax-eof-after-blank-dot" . +<#test-nq-syntax-all-rules> + a rdft:TestNQuadsPositiveSyntax ; + mf:action ; + mf:name "test-nq-syntax-all-rules" . + <#test-nq-syntax-dot-end> a rdft:TestNQuadsPositiveSyntax ; mf:action ; @@ -234,6 +241,11 @@ mf:action ; mf:name "test-nq-syntax-eol-lfcr" . +<#test-nt-syntax-all-rules> + a rdft:TestNTriplesPositiveSyntax ; + mf:action ; + mf:name "test-nt-syntax-all-rules" . + <#test-nt-syntax-blank-dot> a rdft:TestNTriplesPositiveSyntax ; mf:action ; diff --git a/test/extra/good/test-nq-syntax-all-rules.nq b/test/extra/good/test-nq-syntax-all-rules.nq new file mode 100644 index 00000000..a8b80b9a --- /dev/null +++ b/test/extra/good/test-nq-syntax-all-rules.nq @@ -0,0 +1,7 @@ +# Cover as many grammar rules/situations as possible in a small document +_:e.u.s _:o. +_:e.u.s "o"@en-gb _:g. + _:s "ob\t\b\n\r\f\\\"\'\u0025\U00015678ject" . +_:s "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . +_:s "o"^^ . +_:s "o"@en _:g . diff --git a/test/extra/good/test-nt-syntax-all-rules.nt b/test/extra/good/test-nt-syntax-all-rules.nt new file mode 100644 index 00000000..ed84f410 --- /dev/null +++ b/test/extra/good/test-nt-syntax-all-rules.nt @@ -0,0 +1,7 @@ +# Cover as many grammar rules/situations as possible in a small document +_:s "ob\t\b\n\r\f\\\"\'\u0025\U00015678ject" . +_:s "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . + _:s "o"^^ . +_:s "o"@en . +_:e.u.s "o"@en-gb . +_:e.u.s _:o. diff --git a/test/extra/good/test-trig-syntax-all-rules.trig b/test/extra/good/test-trig-syntax-all-rules.trig new file mode 100644 index 00000000..97557b86 --- /dev/null +++ b/test/extra/good/test-trig-syntax-all-rules.trig @@ -0,0 +1,56 @@ +# Cover as many grammar rules/situations as possible in a small document + +@base <> . +@prefix eg: . + "ob\t\b\n\r\f\\\"\'\u0025\U00015678ject" . + """long + ""string""\t\b\n\r\f\'\u0025\U00015678""" . +eg:s eg:p "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . + eg:sub%25ject eg:pr\~d "o"^^eg:T . +eg:sub%25ject eg:pr\~d "o"@en . +_:e.u.s eg:p "o"@en-gb . +_:e.u.s eg:p _:o. +_:e.u.s eg:p‿r⁀d 2. +_:e.u.s eg:prèd 3 . +_:e.u.s eg:pͯ 4.5. +eg:s eg:p 0 , .1 , 2.3 , 4E5, 6e07 . +eg:s eg:p .7e8 , .9E0 , 1.e2 , 3.E4 . +eg:s eg:p .2E3 , .4e5 , 6.7E8 , 9. + [ ] eg:p 0.e1, 2.E3. +[] eg:p (1 -2.3 4e5 +6.E-7 8.e+9 .1 -.2 +.3) . +eg:s eg:p [] . +[ + eg:p1 eg:o1 ; + eg:p2 _:o2 ; + eg:p3 "o3" ; + + ] a eg:S . + +GRAPH eg:g1 { + [ + eg:p1 eg:o1 ; + eg:p2 _:o2 ; + eg:p3 "o3" + ] a eg:S . +} + +GRAPH [ ] { + [ + eg:p1 eg:o1 ; + ] a eg:Anonymous , eg:Subject . +} + +_:g2 { + eg:s2 + eg:p4 [ + eg:op1 "oo1" + ] , + "o4" , + eg:o5 , + _:o.6. +} + +eg:g3 { + _:s3 eg:p5 ( _:o7 "o8" eg:o9 ) . + _:s4 eg:p6 () , [] . +} diff --git a/test/extra/good/test-ttl-syntax-all-rules.ttl b/test/extra/good/test-ttl-syntax-all-rules.ttl new file mode 100644 index 00000000..ead2e8a8 --- /dev/null +++ b/test/extra/good/test-ttl-syntax-all-rules.ttl @@ -0,0 +1,26 @@ +# Cover as many grammar rules/situations as possible in a small document +@base <> . +@prefix eg: . + "ob\t\b\n\r\f\\\"\'\u0025\U00015678ject" . + """long + ""string""\t\b\n\r\f\'\u0025\U00015678""" . +eg:s eg:p "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . + eg:sub%25ject eg:pr\~d "o"^^eg:T . +eg:sub%25ject eg:pr\~d "o"@en . +_:e.u.s eg:p "o"@en-gb . +_:e.u.s eg:p _:o. +_:e.u.s eg:p‿r⁀d 2. +_:e.u.s eg:prèd 3 . +_:e.u.s eg:pͯ 4.5. +eg:s eg:p 0 , .1 , 2.3 , 4E5, 6e07 . +eg:s eg:p .7e8 , .9E0 , 1.e2 , 3.E4 . +eg:s eg:p .2E3 , .4e5 , 6.7E8 , 9. + [ ] eg:p 0.e1, 2.E3. +[] eg:p (1 -2.3 4e5 +6.E-7 8.e+9 .1 -.2 +.3) . +eg:s eg:p [] . +[ + eg:p1 eg:o1 ; + eg:p2 _:o2 ; + eg:p3 "o3" ; + + ] a eg:S . -- cgit v1.2.1