Skip to content

Commit

Permalink
Update tests for RelatedDocumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Jan 9, 2025
1 parent 1bdf61a commit 86a86a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Tests/RelatedDocumentation.wlt
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ VerificationTest[
(* ::Section::Closed:: *)
(*RelatedDocumentation*)
VerificationTest[
uris = RelatedDocumentation[ "What's the biggest pokemon?" ],
{ __String },
urls = RelatedDocumentation[ "What's the biggest pokemon?" ],
{ URL[ _String ].. },
SameTest -> MatchQ,
TestID -> "RelatedDocumentation-URIs@@Tests/RelatedDocumentation.wlt:30,1-35,2"
]

VerificationTest[
Length @ Select[
uris,
First /@ urls,
StringStartsQ @ StringExpression[
"paclet:ref/",
"interpreter"|"entity"|"textcontent",
Expand Down Expand Up @@ -65,14 +65,14 @@ VerificationTest[
]

VerificationTest[
uris = RelatedDocumentation[ "What's the biggest pokemon?", Automatic, 3 ],
{ _String, _String, _String },
urls = RelatedDocumentation[ "What's the biggest pokemon?", Automatic, 3, "Sources" -> { "Documentation" } ],
{ URL[ _String ], URL[ _String ], URL[ _String ] },
SameTest -> MatchQ,
TestID -> "RelatedDocumentation-URIs-Count@@Tests/RelatedDocumentation.wlt:67,1-72,2"
]

VerificationTest[
AllTrue[ uris, StringStartsQ[ "paclet:ref/" ] ],
AllTrue[ First /@ urls, StringStartsQ[ "paclet:ref/" ] ],
True,
SameTest -> MatchQ,
TestID -> "RelatedDocumentation-URIs-Match@@Tests/RelatedDocumentation.wlt:74,1-79,2"
Expand Down

0 comments on commit 86a86a2

Please sign in to comment.