Skip to content

Commit

Permalink
add populated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Nov 21, 2024
1 parent 0c04de8 commit 71d899d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/tests/rp/abstract-lang-checks/abstract-lang-test-1/fail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?oxygen SCHSchema="abstract-lang-test-1.sch"?>
<!--Context: abstract[@xml:lang]
Test: assert $subtag-description!=''
Message: The xml:lang attribute on must contain one of the IETF RFC 5646 subtags. '' is not one of these values. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<article-meta>
<abstract xml:lang="spanish"/>
<abstract xml:lang="german"/>
<abstract xml:lang="irish"/>
<abstract xml:lang="hatian-creole"/>
<abstract xml:lang="hiri-motu"/>
<abstract xml:lang="zulu"/>
</article-meta>
</article>
</root>
16 changes: 16 additions & 0 deletions test/tests/rp/abstract-lang-checks/abstract-lang-test-1/pass.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?oxygen SCHSchema="abstract-lang-test-1.sch"?>
<!--Context: abstract[@xml:lang]
Test: assert $subtag-description!=''
Message: The xml:lang attribute on must contain one of the IETF RFC 5646 subtags. '' is not one of these values. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<article-meta>
<abstract xml:lang="es"/>
<abstract xml:lang="de"/>
<abstract xml:lang="ga"/>
<abstract xml:lang="ht"/>
<abstract xml:lang="ho"/>
<abstract xml:lang="zu"/>
</article-meta>
</article>
</root>
16 changes: 16 additions & 0 deletions test/tests/rp/abstract-lang-checks/abstract-lang-test-2/fail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?oxygen SCHSchema="abstract-lang-test-2.sch"?>
<!--Context: abstract[@xml:lang]
Test: report $subtag-description!=''
Message: has an xml:lang attribute with the value '', which corresponds to the following language: . Please check this is correct. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<article-meta>
<abstract xml:lang="es"/>
<abstract xml:lang="de"/>
<abstract xml:lang="ga"/>
<abstract xml:lang="ht"/>
<abstract xml:lang="ho"/>
<abstract xml:lang="zu"/>
</article-meta>
</article>
</root>
11 changes: 11 additions & 0 deletions test/tests/rp/abstract-lang-checks/abstract-lang-test-2/pass.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?oxygen SCHSchema="abstract-lang-test-2.sch"?>
<!--Context: abstract[@xml:lang]
Test: report $subtag-description!=''
Message: has an xml:lang attribute with the value '', which corresponds to the following language: . Please check this is correct. -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<article-meta>
<abstract xml:lang=""/>
</article-meta>
</article>
</root>

0 comments on commit 71d899d

Please sign in to comment.