Skip to content

Commit

Permalink
add some more exercises to the test pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tayloraswift committed May 13, 2024
1 parent 2054d90 commit 1ffe16c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Sources/UnidocQueryTests/Tests/LinkResolution.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,30 @@ struct LinkResolution:UnidocDatabaseTestBattery
"Internal-links#Level four heading",
"Internal-links#Level four heading with hashtag (#)",
],

"LinkAnchors.LinkAnchors": [
// This is a known bug:
// https://github.com/tayloraswift/swift-unidoc/issues/196

"LinkAnchors",
//"LinkAnchors#Using the LinkAnchors enum",
],

"LinkAnchors.LinkAnchors.a": [
"LinkAnchors a",
],
],
fragmentLinks: [
"Using the LinkAnchors enum"
]),

.init(name: "InternalLinks",
path: ["LinkAnchors", "Internal-links"],
internalLinks: [
"LinkAnchors.Internal-links": [
"Internal-links",
],
],
// Both the roundabout link and the direct link should be optimized to a single
// direct link.
fragmentLinks: [
Expand Down
3 changes: 3 additions & 0 deletions TestPackages/swift-test/Sources/LinkAnchors/LinkAnchors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
/// Link to current page: <doc:LinkAnchors#Using-the-LinkAnchors-enum>
///
/// ## Using the `LinkAnchors` enum
///
/// Link to a member: ``LinkAnchors.a``
public
enum LinkAnchors
{
case a
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This is an example article that contains multiple linkable headings.

This is a roundabout link to this page: <doc:Internal-links>.

This is a roundabout link to a heading on this page: <doc:Internal-links#Level-two-heading>.

This is a direct link to a heading on this page: <doc:#Level-two-heading>.
Expand Down

0 comments on commit 1ffe16c

Please sign in to comment.