@@ -7,55 +7,79 @@ module ``inline elements``.``complex anchors``
77open Xunit
88open authoring.CrossLinkResolverAssertions
99
10- type ``scenario 1 `` () =
10+ type ``Scenario 1: complex redirect mapping with anchor dropping for fallback redirects `` () =
1111
1212 [<Fact>]
1313 let ``No anchor redirects to new - anchorless page`` () =
14- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md" ) " /testing/redirects/multi-topic-page-1-new-anchorless"
14+ resolvesTo
15+ " docs-content://testing/redirects/multi-topic-page-1-old.md"
16+ " /testing/redirects/multi-topic-page-1-new-anchorless"
1517
1618 [<Fact>]
1719 let ``Unmatched anchor for '! ' rule redirects to new - anchorless page and drops anchor`` () =
18- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md#unmatched-anchor" ) " /testing/redirects/multi-topic-page-1-new-anchorless"
20+ resolvesTo
21+ " docs-content://testing/redirects/multi-topic-page-1-old.md#unmatched-anchor"
22+ " /testing/redirects/multi-topic-page-1-new-anchorless"
1923
2024 [<Fact>]
2125 let ``topic - a - intro redirects to topic - a - subpage and drops anchor ( null target ) ``() =
22- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-a-intro" ) " /testing/redirects/multi-topic-page-1-new-topic-a-subpage"
26+ resolvesTo
27+ " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-a-intro"
28+ " /testing/redirects/multi-topic-page-1-new-topic-a-subpage"
2329
2430 [<Fact>]
2531 let ``topic - a - details redirects to topic - a - subpage with new anchor`` () =
26- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-a-details" ) " /testing/redirects/multi-topic-page-1-new-topic-a-subpage#details-anchor"
32+ resolvesTo
33+ " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-a-details"
34+ " /testing/redirects/multi-topic-page-1-new-topic-a-subpage#details-anchor"
2735
2836 [<Fact>]
2937 let ``topic - b - main redirects to topic - b - subpage with new anchor`` () =
30- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-b-main" ) " /testing/redirects/multi-topic-page-1-new-topic-b-subpage#main-anchor"
38+ resolvesTo
39+ " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-b-main"
40+ " /testing/redirects/multi-topic-page-1-new-topic-b-subpage#main-anchor"
3141
3242 [<Fact>]
3343 let ``topic - c - main redirects to old page and keeps anchor`` () =
34- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-c-main" ) " /testing/redirects/multi-topic-page-1-old#topic-c-main"
44+ resolvesTo
45+ " docs-content://testing/redirects/multi-topic-page-1-old.md#topic-c-main"
46+ " /testing/redirects/multi-topic-page-1-old#topic-c-main"
3547
3648
37- type ``Scenario 2`` () =
49+ type ``Scenario 2: complex redirect mapping with anchor passing for fallback redirects `` () =
3850
3951 [<Fact>]
4052 let ``No anchor redirects to old page ( self ) ``() =
41- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md" ) " /testing/redirects/multi-topic-page-2-old"
53+ resolvesTo
54+ " docs-content://testing/redirects/multi-topic-page-2-old.md"
55+ " /testing/redirects/multi-topic-page-2-old"
4256
4357 [<Fact>]
4458 let ``Unmatched anchor for '{} ' rule redirects to old page ( self ) and keeps anchor`` () =
45- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md#unmatched-anchor" ) " /testing/redirects/multi-topic-page-2-old#unmatched-anchor"
59+ resolvesTo
60+ " docs-content://testing/redirects/multi-topic-page-2-old.md#unmatched-anchor"
61+ " /testing/redirects/multi-topic-page-2-old#unmatched-anchor"
4662
4763 [<Fact>]
4864 let ``topic - a - intro redirects to topic - a - subpage with new anchor`` () =
49- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-a-intro" ) " /testing/redirects/multi-topic-page-2-new-topic-a-subpage#introduction"
65+ resolvesTo
66+ " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-a-intro"
67+ " /testing/redirects/multi-topic-page-2-new-topic-a-subpage#introduction"
5068
5169 [<Fact>]
5270 let ``topic - a - details redirects to topic - a - subpage and drops anchor ( null target ) ``() =
53- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-a-details" ) " /testing/redirects/multi-topic-page-2-new-topic-a-subpage"
71+ resolvesTo
72+ " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-a-details"
73+ " /testing/redirects/multi-topic-page-2-new-topic-a-subpage"
5474
5575 [<Fact>]
5676 let ``topic - b - main redirects to topic - b - subpage with new anchor`` () =
57- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-b-main" ) " /testing/redirects/multi-topic-page-2-new-topic-b-subpage#summary"
77+ resolvesTo
78+ " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-b-main"
79+ " /testing/redirects/multi-topic-page-2-new-topic-b-subpage#summary"
5880
5981 [<Fact>]
6082 let ``topic - b - config redirects to topic - b - subpage and drops anchor ( null target ) ``() =
61- resolvesTo ( " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-b-config" ) " /testing/redirects/multi-topic-page-2-new-topic-b-subpage"
83+ resolvesTo
84+ " docs-content://testing/redirects/multi-topic-page-2-old.md#topic-b-config"
85+ " /testing/redirects/multi-topic-page-2-new-topic-b-subpage"
0 commit comments