From 86ce80f96332ae40523d60f9482ad7db1834a6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20R=C3=B6nnqvist?= Date: Thu, 5 Dec 2024 10:32:51 +0100 Subject: [PATCH] Rename legacy test bundle again --- .../Benchmark/ExternalTopicsHashTests.swift | 8 +- .../Benchmark/TopicGraphHashTests.swift | 6 +- .../DocumentationContextConverterTests.swift | 6 +- .../Converter/RenderContextTests.swift | 2 +- .../TopicRenderReferenceEncoderTests.swift | 4 +- ...icConsoleWriterDefaultFormattingTest.swift | 4 +- .../ConvertService/ConvertServiceTests.swift | 10 +- .../Indexing/IndexingTests.swift | 8 +- .../Indexing/NavigatorIndexTests.swift | 16 +-- .../Indexing/RenderIndexTests.swift | 2 +- .../AutomaticCurationTests.swift | 12 +- .../Infrastructure/BundleDiscoveryTests.swift | 4 +- .../DocumentationBundleInfoTests.swift | 2 +- .../DocumentationBundleTests.swift | 2 +- .../DocumentationContextTests.swift | 60 +++++----- .../DocumentationCuratorTests.swift | 10 +- .../ExternalReferenceResolverTests.swift | 22 ++-- .../InheritIntroducedAvailabilityTests.swift | 2 +- .../Infrastructure/PathHierarchyTests.swift | 2 +- .../PresentationURLGeneratorTests.swift | 2 +- .../ReferenceResolverTests.swift | 16 +-- .../AbsoluteSymbolLinkTests.swift | 2 +- .../SymbolGraph/SymbolGraphLoaderTests.swift | 6 +- .../LinkDestinationSummaryTests.swift | 4 +- .../Model/RenderContentMetadataTests.swift | 14 +-- .../RenderHierarchyTranslatorTests.swift | 4 +- .../Model/RenderNodeDiffingBundleTests.swift | 2 +- .../Model/RenderNodeSerializationTests.swift | 8 +- .../Model/SemaToRenderNodeTests.swift | 110 +++++++++--------- .../Rendering/AutomaticSeeAlsoTests.swift | 10 +- .../AvailabilityRenderOrderTests.swift | 2 +- .../ConstraintsRenderSectionTests.swift | 16 +-- .../Rendering/DefaultAvailabilityTests.swift | 6 +- .../DefaultCodeListingSyntaxTests.swift | 2 +- .../Rendering/DeprecationSummaryTests.swift | 4 +- .../Rendering/ExternalLinkTitleTests.swift | 2 +- .../Rendering/LinkTitleResolverTests.swift | 2 +- .../RenderContentCompilerTests.swift | 4 +- .../Rendering/RenderMetadataTests.swift | 6 +- ...derNodeTranslatorSymbolVariantsTests.swift | 4 +- .../Rendering/RenderNodeTranslatorTests.swift | 22 ++-- .../SwiftDocCTests/Rendering/RoleTests.swift | 6 +- .../Semantics/ChapterTests.swift | 2 +- .../Semantics/ImageMediaTests.swift | 4 +- .../MarkupReferenceResolverTests.swift | 2 +- .../Semantics/MetadataTests.swift | 2 +- .../Semantics/MultipleChoiceTests.swift | 12 +- .../Semantics/RedirectedTests.swift | 28 ++--- .../Semantics/Reference/LinksTests.swift | 2 +- .../Semantics/ResourcesTests.swift | 6 +- .../Semantics/SectionTests.swift | 2 +- .../SwiftDocCTests/Semantics/StackTests.swift | 6 +- .../SwiftDocCTests/Semantics/StepTests.swift | 6 +- .../Semantics/SymbolTests.swift | 8 +- .../Semantics/TechnologyTests.swift | 2 +- .../SwiftDocCTests/Semantics/TileTests.swift | 14 +-- .../Semantics/TutorialArticleTests.swift | 20 ++-- .../Semantics/TutorialReferenceTests.swift | 6 +- .../Semantics/TutorialTests.swift | 14 +-- .../DocumentationSchemeHandlerTests.swift | 2 +- .../Servers/FileServerTests.swift | 10 +- .../Default Code Listing Syntax.md | 0 .../FillIntroduced.symbols.json | 0 .../Info.plist | 0 .../MyKit@SideKit.symbols.json | 0 .../TestOverview.tutorial | 0 .../TestTutorial.tutorial | 0 .../TestTutorial2.tutorial | 0 .../TestTutorialArticle.tutorial | 0 .../TutorialMediaWithSpaces.tutorial | 0 .../article.md | 0 .../article2.md | 0 .../article3.md | 0 .../documentation/myclass.md | 0 .../documentation/mykit.md | 0 .../documentation/myprotocol.md | 0 .../documentation/sideclass-init.md | 0 .../documentation/sidekit.md | 0 .../figure1.png | Bin .../figure1~dark.png | Bin .../helloworld.swift | 0 .../helloworld1.swift | 0 .../helloworld2.swift | 0 .../helloworld3.swift | 0 .../helloworld4.swift | 0 .../images/figure1.jpg | Bin .../intro.png | Bin .../introposter.png | Bin .../introposter2.png | Bin .../introvideo.mp4 | Bin .../introvideo~dark.mp4 | Bin .../mykit-iOS.symbols.json | 0 .../project.zip | Bin .../sidekit.symbols.json | 0 .../something@2x.png | Bin .../step.png | Bin .../titled2up.png | Bin .../titled2upCapital.PNG | Bin .../with spaces.mp4 | Bin .../with spaces.png | Bin .../with spaces@2x.png | Bin ...nvertSubcommandSourceRepositoryTests.swift | 2 +- .../ConvertSubcommandTests.swift | 2 +- .../PreviewSubcommandTests.swift | 2 +- .../ConvertActionIndexerTests.swift | 2 +- .../ConvertActionStaticHostableTests.swift | 2 +- .../ConvertActionTests.swift | 28 ++--- .../IndexActionTests.swift | 2 +- .../PreviewActionIntegrationTests.swift | 2 +- .../StaticHostableTransformerTests.swift | 4 +- .../Default Code Listing Syntax.md | 0 .../FillIntroduced.symbols.json | 0 .../Info.plist | 0 .../MyKit@SideKit.symbols.json | 0 .../TestOverview.tutorial | 0 .../TestTutorial.tutorial | 0 .../TestTutorial2.tutorial | 0 .../TestTutorialArticle.tutorial | 0 .../TutorialMediaWithSpaces.tutorial | 0 .../article.md | 0 .../article2.md | 0 .../article3.md | 0 .../documentation/myclass.md | 0 .../documentation/mykit.md | 0 .../documentation/myprotocol.md | 0 .../documentation/sideclass-init.md | 0 .../documentation/sidekit.md | 0 .../figure1.png | Bin .../figure1~dark.png | Bin .../helloworld.swift | 0 .../helloworld1.swift | 0 .../helloworld2.swift | 0 .../helloworld3.swift | 0 .../helloworld4.swift | 0 .../intro.png | Bin .../introposter.png | Bin .../introposter2.png | Bin .../introvideo.mp4 | Bin .../introvideo~dark.mp4 | Bin .../mykit-iOS.symbols.json | 0 .../project.zip | Bin .../sidekit.symbols.json | 0 .../something@2x.png | Bin .../step.png | Bin .../titled2up.png | Bin .../titled2upCapital.PNG | Bin .../with spaces.mp4 | Bin .../with spaces.png | Bin .../with spaces@2x.png | Bin ...TransformForStaticHostingActionTests.swift | 4 +- .../Utility/FileTests.swift | 2 +- 151 files changed, 318 insertions(+), 318 deletions(-) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/Default Code Listing Syntax.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/FillIntroduced.symbols.json (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/Info.plist (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/MyKit@SideKit.symbols.json (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestOverview.tutorial (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorial.tutorial (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorial2.tutorial (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorialArticle.tutorial (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TutorialMediaWithSpaces.tutorial (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article2.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article3.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/myclass.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/mykit.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/myprotocol.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/sideclass-init.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/sidekit.md (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/figure1.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/figure1~dark.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld.swift (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld1.swift (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld2.swift (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld3.swift (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld4.swift (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/images/figure1.jpg (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/intro.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introposter.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introposter2.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introvideo.mp4 (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introvideo~dark.mp4 (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/mykit-iOS.symbols.json (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/project.zip (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/sidekit.symbols.json (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/something@2x.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/step.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/titled2up.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/titled2upCapital.PNG (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces.mp4 (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces.png (100%) rename Tests/SwiftDocCTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces@2x.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/Default Code Listing Syntax.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/FillIntroduced.symbols.json (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/Info.plist (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/MyKit@SideKit.symbols.json (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestOverview.tutorial (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorial.tutorial (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorial2.tutorial (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TestTutorialArticle.tutorial (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/TutorialMediaWithSpaces.tutorial (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article2.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/article3.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/myclass.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/mykit.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/myprotocol.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/sideclass-init.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/documentation/sidekit.md (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/figure1.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/figure1~dark.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld.swift (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld1.swift (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld2.swift (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld3.swift (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/helloworld4.swift (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/intro.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introposter.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introposter2.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introvideo.mp4 (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/introvideo~dark.mp4 (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/mykit-iOS.symbols.json (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/project.zip (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/sidekit.symbols.json (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/something@2x.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/step.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/titled2up.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/titled2upCapital.PNG (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces.mp4 (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces.png (100%) rename Tests/SwiftDocCUtilitiesTests/Test Bundles/{DoNotUseInNewTests.docc => LegacyBundle_DoNotUseInNewTests.docc}/with spaces@2x.png (100%) diff --git a/Tests/SwiftDocCTests/Benchmark/ExternalTopicsHashTests.swift b/Tests/SwiftDocCTests/Benchmark/ExternalTopicsHashTests.swift index c6c854889b..20c36ce3f7 100644 --- a/Tests/SwiftDocCTests/Benchmark/ExternalTopicsHashTests.swift +++ b/Tests/SwiftDocCTests/Benchmark/ExternalTopicsHashTests.swift @@ -39,7 +39,7 @@ class ExternalTopicsGraphHashTests: XCTestCase { func testNoMetricAddedIfNoExternalTopicsAreResolved() throws { // Load bundle without using external resolvers - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") XCTAssertTrue(context.externallyResolvedLinks.isEmpty) // Try adding external topics metrics @@ -55,7 +55,7 @@ class ExternalTopicsGraphHashTests: XCTestCase { // Add external links and verify the checksum is always the same let hashes: [String] = try (0...10).map { _ -> MetricValue? in - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in try """ # ``SideKit/SideClass`` @@ -93,7 +93,7 @@ class ExternalTopicsGraphHashTests: XCTestCase { // Add external links and verify the checksum is always the same let hashes: [String] = try (0...10).map { _ -> MetricValue? in - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver], externalSymbolResolver: externalSymbolResolver) { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver], externalSymbolResolver: externalSymbolResolver) { url in try """ # ``SideKit/SideClass`` @@ -131,7 +131,7 @@ class ExternalTopicsGraphHashTests: XCTestCase { let externalResolver = self.externalResolver // Load a bundle with external links - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in try """ # ``SideKit/SideClass`` diff --git a/Tests/SwiftDocCTests/Benchmark/TopicGraphHashTests.swift b/Tests/SwiftDocCTests/Benchmark/TopicGraphHashTests.swift index 4bc62f04eb..d4b5ecbc50 100644 --- a/Tests/SwiftDocCTests/Benchmark/TopicGraphHashTests.swift +++ b/Tests/SwiftDocCTests/Benchmark/TopicGraphHashTests.swift @@ -14,7 +14,7 @@ import XCTest class TopicGraphHashTests: XCTestCase { func testTopicGraphSameHash() throws { let hashes: [String] = try (0...10).map { _ -> MetricValue? in - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let testBenchmark = Benchmark() benchmark(add: Benchmark.TopicGraphHash(context: context), benchmarkLog: testBenchmark) return testBenchmark.metrics[0].result @@ -32,7 +32,7 @@ class TopicGraphHashTests: XCTestCase { func testTopicGraphChangedHash() throws { // Verify that the hash changes if we change the topic graph let initialHash: String - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") do { let testBenchmark = Benchmark() @@ -88,7 +88,7 @@ class TopicGraphHashTests: XCTestCase { "/externally/resolved/path/to/article2": .success(.init(referencePath: "/externally/resolved/path/to/article2")), ] - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [ + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [ "com.external.testbundle" : resolver ]) { url in // Add external links to the MyKit Topics. diff --git a/Tests/SwiftDocCTests/Converter/DocumentationContextConverterTests.swift b/Tests/SwiftDocCTests/Converter/DocumentationContextConverterTests.swift index e91f82e36e..f5200edd8e 100644 --- a/Tests/SwiftDocCTests/Converter/DocumentationContextConverterTests.swift +++ b/Tests/SwiftDocCTests/Converter/DocumentationContextConverterTests.swift @@ -14,7 +14,7 @@ import XCTest class DocumentationContextConverterTests: XCTestCase { func testRenderNodesAreIdentical() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // We'll use this to convert nodes ad-hoc let perNodeConverter = DocumentationNodeConverter(bundle: bundle, context: context) @@ -41,7 +41,7 @@ class DocumentationContextConverterTests: XCTestCase { } func testSymbolLocationsAreOnlyIncludedWhenRequested() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let fillIntroducedSymbolNode = try XCTUnwrap( @@ -71,7 +71,7 @@ class DocumentationContextConverterTests: XCTestCase { } func testSymbolAccessLevelsAreOnlyIncludedWhenRequested() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let fillIntroducedSymbolNode = try XCTUnwrap( diff --git a/Tests/SwiftDocCTests/Converter/RenderContextTests.swift b/Tests/SwiftDocCTests/Converter/RenderContextTests.swift index 2989cfe8ae..786b321da4 100644 --- a/Tests/SwiftDocCTests/Converter/RenderContextTests.swift +++ b/Tests/SwiftDocCTests/Converter/RenderContextTests.swift @@ -14,7 +14,7 @@ import XCTest class RenderContextTests: XCTestCase { func testCreatesRenderReferences() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) diff --git a/Tests/SwiftDocCTests/Converter/TopicRenderReferenceEncoderTests.swift b/Tests/SwiftDocCTests/Converter/TopicRenderReferenceEncoderTests.swift index b05d35b38d..37948fdd19 100644 --- a/Tests/SwiftDocCTests/Converter/TopicRenderReferenceEncoderTests.swift +++ b/Tests/SwiftDocCTests/Converter/TopicRenderReferenceEncoderTests.swift @@ -158,7 +158,7 @@ class TopicRenderReferenceEncoderTests: XCTestCase { /// Verifies that when JSON encoder should sort keys, the custom render reference cache /// respects that setting and prints the referencs in alphabetical order. func testSortedReferences() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let converter = DocumentationNodeConverter(bundle: bundle, context: context) // Create a JSON encoder @@ -218,7 +218,7 @@ class TopicRenderReferenceEncoderTests: XCTestCase { // Verifies that there is no extra comma at the end of the references list. func testRemovesLastReferencesListDelimiter() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let converter = DocumentationNodeConverter(bundle: bundle, context: context) // Create a JSON encoder diff --git a/Tests/SwiftDocCTests/Diagnostics/DiagnosticConsoleWriterDefaultFormattingTest.swift b/Tests/SwiftDocCTests/Diagnostics/DiagnosticConsoleWriterDefaultFormattingTest.swift index e119079956..6943f58bc6 100644 --- a/Tests/SwiftDocCTests/Diagnostics/DiagnosticConsoleWriterDefaultFormattingTest.swift +++ b/Tests/SwiftDocCTests/Diagnostics/DiagnosticConsoleWriterDefaultFormattingTest.swift @@ -229,7 +229,7 @@ class DiagnosticConsoleWriterDefaultFormattingTest: XCTestCase { let summary = "Test diagnostic summary" let explanation = "Test diagnostic explanation." let baseURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let source = baseURL.appendingPathComponent("TestTutorial.tutorial") let range = SourceLocation(line: 44, column: 59, source: source)..() @@ -895,7 +895,7 @@ Root } func testNavigatorIndexUsingPageTitleGeneration() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let converter = DocumentationContextConverter(bundle: bundle, context: context, renderContext: renderContext) var results = Set() @@ -944,7 +944,7 @@ Root } func testNavigatorIndexGenerationNoPaths() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let converter = DocumentationNodeConverter(bundle: bundle, context: context) var results = Set() @@ -1001,7 +1001,7 @@ Root } func testNavigatorIndexGenerationWithLanguageGrouping() throws { - let navigatorIndex = try generatedNavigatorIndex(for: "DoNotUseInNewTests", bundleIdentifier: testBundleIdentifier) + let navigatorIndex = try generatedNavigatorIndex(for: "LegacyBundle_DoNotUseInNewTests", bundleIdentifier: testBundleIdentifier) XCTAssertEqual(navigatorIndex.availabilityIndex.platforms, [.watchOS, .macCatalyst, .iOS, .tvOS, .macOS, .iPadOS]) XCTAssertEqual(navigatorIndex.availabilityIndex.versions(for: .iOS), Set([ @@ -1021,7 +1021,7 @@ Root func testNavigatorIndexGenerationWithCuratedFragment() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let converter = DocumentationContextConverter(bundle: bundle, context: context, renderContext: renderContext) var results = Set() @@ -1084,7 +1084,7 @@ Root } func testNavigatorIndexAvailabilityGeneration() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let converter = DocumentationContextConverter(bundle: bundle, context: context, renderContext: renderContext) @@ -1214,7 +1214,7 @@ Root } func testNavigatorIndexDifferentHasherGeneration() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let renderContext = RenderContext(documentationContext: context, bundle: bundle) let converter = DocumentationContextConverter(bundle: bundle, context: context, renderContext: renderContext) @@ -1663,7 +1663,7 @@ Root } func testNavigatorIndexAsReadOnlyFile() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let converter = DocumentationNodeConverter(bundle: bundle, context: context) let targetURL = try createTemporaryDirectory() diff --git a/Tests/SwiftDocCTests/Indexing/RenderIndexTests.swift b/Tests/SwiftDocCTests/Indexing/RenderIndexTests.swift index 9e335a4e28..5cc0df3c62 100644 --- a/Tests/SwiftDocCTests/Indexing/RenderIndexTests.swift +++ b/Tests/SwiftDocCTests/Indexing/RenderIndexTests.swift @@ -24,7 +24,7 @@ final class RenderIndexTests: XCTestCase { ) try XCTAssertEqual( - generatedRenderIndex(for: "DoNotUseInNewTests", with: "org.swift.docc.example"), + generatedRenderIndex(for: "LegacyBundle_DoNotUseInNewTests", with: "org.swift.docc.example"), RenderIndex.fromURL(expectedIndexURL) ) } diff --git a/Tests/SwiftDocCTests/Infrastructure/AutomaticCurationTests.swift b/Tests/SwiftDocCTests/Infrastructure/AutomaticCurationTests.swift index 83adc517ea..5172b4f72f 100644 --- a/Tests/SwiftDocCTests/Infrastructure/AutomaticCurationTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/AutomaticCurationTests.swift @@ -117,7 +117,7 @@ class AutomaticCurationTests: XCTestCase { } func testAutomaticTopicsSkippingCustomCuratedSymbols() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in // Curate some of members of SideClass in an API collection try """ # Some API collection @@ -172,7 +172,7 @@ class AutomaticCurationTests: XCTestCase { for curatedIndices in variationsOfChildrenToCurate { let manualCuration = curatedIndices.map { "- <\(allExpectedChildren[$0])>" }.joined(separator: "\n") - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try """ # ``SideKit/SideClass`` @@ -231,7 +231,7 @@ class AutomaticCurationTests: XCTestCase { } func testSeeAlsoSectionForAutomaticallyCuratedTopics() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in var graph = try JSONDecoder().decode(SymbolGraph.self, from: Data(contentsOf: url.appendingPathComponent("sidekit.symbols.json"))) // Copy `SideClass` a handful of times @@ -421,7 +421,7 @@ class AutomaticCurationTests: XCTestCase { forResource: "TopLevelCuration.symbols", withExtension: "json", subdirectory: "Test Resources")! // Create a test bundle copy with the symbol graph from above - let (bundleURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { url in + let (bundleURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { url in try? FileManager.default.copyItem(at: topLevelCurationSGFURL, to: url.appendingPathComponent("TopLevelCuration.symbols.json")) } defer { @@ -578,7 +578,7 @@ class AutomaticCurationTests: XCTestCase { let whatsitSymbols = Bundle.module.url( forResource: "Whatsit-Objective-C.symbols", withExtension: "json", subdirectory: "Test Resources")! - let (bundleURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (bundleURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try? FileManager.default.copyItem(at: whatsitSymbols, to: url.appendingPathComponent("Whatsit-Objective-C.symbols.json")) } defer { @@ -639,7 +639,7 @@ class AutomaticCurationTests: XCTestCase { let symbolURL = Bundle.module.url( forResource: "TypeSubscript.symbols", withExtension: "json", subdirectory: "Test Resources")! - let (bundleURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (bundleURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try? FileManager.default.copyItem(at: symbolURL, to: url.appendingPathComponent("TypeSubscript.symbols.json")) } defer { diff --git a/Tests/SwiftDocCTests/Infrastructure/BundleDiscoveryTests.swift b/Tests/SwiftDocCTests/Infrastructure/BundleDiscoveryTests.swift index 2e4bde82b2..5885f6748e 100644 --- a/Tests/SwiftDocCTests/Infrastructure/BundleDiscoveryTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/BundleDiscoveryTests.swift @@ -14,9 +14,9 @@ import SwiftDocCTestUtilities class BundleDiscoveryTests: XCTestCase { - private let testBundleLocation = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + private let testBundleLocation = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! private func flatListOfFiles() throws -> [URL] { - let testBundleLocation = try testCatalogURL(named: "DoNotUseInNewTests") + let testBundleLocation = try testCatalogURL(named: "LegacyBundle_DoNotUseInNewTests") let enumerator = try XCTUnwrap(FileManager.default.enumerator(at: testBundleLocation, includingPropertiesForKeys: [.isDirectoryKey], options: .skipsHiddenFiles)) var files: [URL] = [] diff --git a/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleInfoTests.swift b/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleInfoTests.swift index 77ddf500de..65c54072f9 100644 --- a/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleInfoTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleInfoTests.swift @@ -15,7 +15,7 @@ class DocumentationBundleInfoTests: XCTestCase { // Test whether the bundle correctly loads the test bundle Info.plist file. func testLoadTestBundleInfoPlist() throws { let infoPlistURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("Info.plist") let infoPlistData = try Data(contentsOf: infoPlistURL) diff --git a/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleTests.swift b/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleTests.swift index 14e28a51e2..8d03e4f305 100644 --- a/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/DocumentationBundleTests.swift @@ -14,6 +14,6 @@ import XCTest class DocumentationBundleTests: XCTestCase { // Test whether the bundle correctly loads a documentation source folder. func testBundleInitWithRootURL() throws { - XCTAssertNoThrow(try testBundleFromRootURL(named: "DoNotUseInNewTests")) + XCTAssertNoThrow(try testBundleFromRootURL(named: "LegacyBundle_DoNotUseInNewTests")) } } diff --git a/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift b/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift index 168cc01ce2..609bcab8ed 100644 --- a/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift @@ -42,7 +42,7 @@ class DocumentationContextTests: XCTestCase { func testResolve() throws { let workspace = DocumentationWorkspace() let context = try DocumentationContext(dataProvider: workspace) - let bundle = try testBundle(named: "DoNotUseInNewTests") + let bundle = try testBundle(named: "LegacyBundle_DoNotUseInNewTests") let dataProvider = PrebuiltLocalFileSystemDataProvider(bundles: [bundle]) try workspace.registerProvider(dataProvider) @@ -83,7 +83,7 @@ class DocumentationContextTests: XCTestCase { } func testLoadEntity() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let identifier = ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorial", sourceLanguage: .swift) @@ -656,7 +656,7 @@ class DocumentationContextTests: XCTestCase { @available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released") func testCreatesCorrectIdentifiers() throws { let testBundleLocation = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let workspaceContent = Folder(name: "TestWorkspace", content: [ CopyOfFolder(original: testBundleLocation), @@ -824,13 +824,13 @@ class DocumentationContextTests: XCTestCase { InfoPlist(displayName: "TestIgnoresUnknownMarkupFiles", identifier: "com.example.documentation"), Folder(name: "Resources", content: [ CopyOfFile(original: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("documentation") .appendingPathComponent("myprotocol.md")), ]), Folder(name: "Symbols", content: [ CopyOfFile(original: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json")), ]) ]) @@ -1059,7 +1059,7 @@ class DocumentationContextTests: XCTestCase { func testMergesMultipleSymbolDeclarations() throws { let graphContentiOS = try String(contentsOf: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json")) let graphContentmacOS = graphContentiOS @@ -1096,7 +1096,7 @@ class DocumentationContextTests: XCTestCase { func testMergedMultipleSymbolDeclarationsIncludesPlatformSpecificSymbols() throws { let iOSGraphURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json") let graphContentiOS = try String(contentsOf: iOSGraphURL) @@ -1155,10 +1155,10 @@ class DocumentationContextTests: XCTestCase { ]), Folder(name: "Symbols", content: [ CopyOfFile(original: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json")), CopyOfFile(original: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("sidekit.symbols.json")), ]) ]) @@ -1180,7 +1180,7 @@ class DocumentationContextTests: XCTestCase { func testLoadsDeclarationWithNoOS() throws { var graphContentiOS = try String(contentsOf: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json")) // "remove" the operating system information @@ -1246,7 +1246,7 @@ class DocumentationContextTests: XCTestCase { var symbolGraphFiles: [File] { return symbolGraphNames.map { name in - CopyOfFile(original: Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + CopyOfFile(original: Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent(name + ".symbols.json")) } } @@ -1306,7 +1306,7 @@ class DocumentationContextTests: XCTestCase { } func testCuratesSymbolsAndArticlesCorrectly() throws { - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Sort the edges for each node to get consistent results, no matter the order that the symbols were processed. for (source, targets) in context.topicGraph.edges { @@ -1493,7 +1493,7 @@ let expected = """ /// Tests whether tutorial curated multiple times gets the correct breadcrumbs and hierarchy. func testCurateTutorialMultipleTimes() throws { // Curate "TestTutorial" under MyKit as well as TechnologyX. - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let myKitURL = root.appendingPathComponent("documentation/mykit.md") let text = try String(contentsOf: myKitURL).replacingOccurrences(of: "## Topics", with: """ ## Topics @@ -1520,7 +1520,7 @@ let expected = """ func testNonOverloadPaths() throws { // Add some symbol collisions to graph - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let sideKitURL = root.appendingPathComponent("sidekit.symbols.json") let text = try String(contentsOf: sideKitURL).replacingOccurrences(of: "\"symbols\" : [", with: """ "symbols" : [ @@ -1586,7 +1586,7 @@ let expected = """ func testOverloadPlusNonOverloadCollisionPaths() throws { // Add some symbol collisions to graph - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let sideKitURL = root.appendingPathComponent("sidekit.symbols.json") let text = try String(contentsOf: sideKitURL).replacingOccurrences(of: "\"symbols\" : [", with: """ "symbols" : [ @@ -1984,7 +1984,7 @@ let expected = """ func testNonOverloadCollisionFromExtension() throws { // Add some symbol collisions to graph - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: ["mykit-iOS.symbols.json"]) { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: ["mykit-iOS.symbols.json"]) { root in let sideKitURL = root.appendingPathComponent("something@SideKit.symbols.json") let text = """ { @@ -2196,7 +2196,7 @@ let expected = """ func testUpdatesReferencesForChildrenOfCollisions() throws { // Add some symbol collisions to graph - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let sideKitURL = root.appendingPathComponent("sidekit.symbols.json") var text = try String(contentsOf: sideKitURL) @@ -2344,7 +2344,7 @@ let expected = """ var newArticle1URL: URL! // Add an article without curating it anywhere - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Curate MyKit -> new-article1 let myKitURL = root.appendingPathComponent("documentation").appendingPathComponent("mykit.md") try """ @@ -2423,7 +2423,7 @@ let expected = """ // Modules that are being extended should not have their own symbol in the current bundle's graph. func testNoSymbolForTertiarySymbolGraphModules() throws { // Add an article without curating it anywhere - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Create an extension only symbol graph. let tertiaryURL = root.appendingPathComponent("Tertiary@MyKit.symbols.json") try """ @@ -2457,7 +2457,7 @@ let expected = """ } func testDeclarationTokenKinds() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let myFunc = try context.entity(with: ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/documentation/MyKit/MyClass/myFunction()", sourceLanguage: .swift)) @@ -2498,7 +2498,7 @@ let expected = """ // Copy test Info.plist try FileManager.default.copyItem(at: Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("Info.plist"), to: targetURL.appendingPathComponent("Info.plist") ) @@ -2605,7 +2605,7 @@ let expected = """ } func testNavigatorTitle() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") func renderNodeForPath(path: String) throws -> (DocumentationNode, RenderNode) { let reference = ResolvedTopicReference(bundleID: bundle.id, path: path, sourceLanguage: .swift) let node = try context.entity(with: reference) @@ -2716,7 +2716,7 @@ let expected = """ // Verify there is no pool bucket for the bundle we're about to test XCTAssertNil(ResolvedTopicReference._numberOfCachedReferences(bundleID: bundleID)) - let (_, _, _) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], configureBundle: { rootURL in + let (_, _, _) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], configureBundle: { rootURL in let infoPlistURL = rootURL.appendingPathComponent("Info.plist", isDirectory: false) try! String(contentsOf: infoPlistURL) .replacingOccurrences(of: "org.swift.docc.example", with: bundleID.rawValue) @@ -2744,7 +2744,7 @@ let expected = """ } func testAbstractAfterMetadataDirective() throws { - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Get the SideKit/SideClass/init() node and verify it has an abstract and no discussion. // We're verifying that the metadata directive between the title and the abstract didn't cause @@ -2795,7 +2795,7 @@ let expected = """ } func testTaskGroupsPersistInitialRangesFromMarkup() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Verify task group ranges are persisted for symbol docs let symbolReference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit", sourceLanguage: .swift) @@ -2832,7 +2832,7 @@ let expected = """ /// Tests that diagnostics raised during link resolution for symbols have the correct source URLs /// - Bug: rdar://63288817 func testDiagnosticsForSymbolsHaveCorrectSource() throws { - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in let extensionFile = """ # ``SideKit/SideClass/myFunction()`` @@ -2880,7 +2880,7 @@ let expected = """ let bundleURL = try Folder(name: "module-links.docc", content: [ InfoPlist(displayName: "Test", identifier: "com.test.docc"), CopyOfFile(original: Bundle.module.url( - forResource: "DoNotUseInNewTests", + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles" )!.appendingPathComponent("sidekit.symbols.json")), @@ -3992,7 +3992,7 @@ let expected = """ // Verifies if the context resolves linkable nodes. func testLinkableNodes() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try "# Article1".write(to: url.appendingPathComponent("resolvable-article.md"), atomically: true, encoding: .utf8) let myKitURL = url.appendingPathComponent("documentation").appendingPathComponent("mykit.md") try String(contentsOf: myKitURL) @@ -4014,7 +4014,7 @@ let expected = """ // Verifies if the context fails to resolve non-resolvable nodes. func testNonLinkableNodes() throws { // Create a bundle with variety absolute and relative links and symbol links to a non linkable node. - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``SideKit/SideClass`` Abstract. @@ -4464,7 +4464,7 @@ let expected = """ } func testDocumentationExtensionURLForReferenceReturnsNilForTutorialReference() throws { - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") XCTAssertNil( context.documentationExtensionURL( diff --git a/Tests/SwiftDocCTests/Infrastructure/DocumentationCuratorTests.swift b/Tests/SwiftDocCTests/Infrastructure/DocumentationCuratorTests.swift index b571c63ab5..fea832171e 100644 --- a/Tests/SwiftDocCTests/Infrastructure/DocumentationCuratorTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/DocumentationCuratorTests.swift @@ -28,7 +28,7 @@ class DocumentationCuratorTests: XCTestCase { } func testCrawl() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var crawler = DocumentationCurator.init(in: context, bundle: bundle) let mykit = try context.entity(with: ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/documentation/MyKit", sourceLanguage: .swift)) @@ -75,7 +75,7 @@ class DocumentationCuratorTests: XCTestCase { } func testCrawlDiagnostics() throws { - let (tempCatalogURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (tempCatalogURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in let extensionFile = url.appendingPathComponent("documentation/myfunction.md") try """ @@ -278,7 +278,7 @@ class DocumentationCuratorTests: XCTestCase { } func testSymbolLinkResolving() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let crawler = DocumentationCurator.init(in: context, bundle: bundle) @@ -331,7 +331,7 @@ class DocumentationCuratorTests: XCTestCase { } func testLinkResolving() throws { - let (sourceRoot, bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (sourceRoot, bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var crawler = DocumentationCurator.init(in: context, bundle: bundle) @@ -386,7 +386,7 @@ class DocumentationCuratorTests: XCTestCase { } func testGroupLinkValidation() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { root in // Create a sidecar with invalid group links try! """ # ``SideKit`` diff --git a/Tests/SwiftDocCTests/Infrastructure/ExternalReferenceResolverTests.swift b/Tests/SwiftDocCTests/Infrastructure/ExternalReferenceResolverTests.swift index f3057ee9a4..4c61ba3adc 100644 --- a/Tests/SwiftDocCTests/Infrastructure/ExternalReferenceResolverTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/ExternalReferenceResolverTests.swift @@ -59,7 +59,7 @@ class ExternalReferenceResolverTests: XCTestCase { func testResolveExternalReference() throws { let (_, bundle, context) = try testBundleAndContext( - copying: "DoNotUseInNewTests", + copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : TestExternalReferenceResolver()] ) { url in let myClassExtensionFile = url.appendingPathComponent("documentation").appendingPathComponent("myclass.md") @@ -97,7 +97,7 @@ class ExternalReferenceResolverTests: XCTestCase { externalResolver.resolvedEntityLanguage = .data let (_, bundle, context) = try testBundleAndContext( - copying: "DoNotUseInNewTests", + copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver] ) { url in let sideClassExtension = """ @@ -158,7 +158,7 @@ class ExternalReferenceResolverTests: XCTestCase { @available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released") func testResolvesReferencesExternallyOnlyWhenFallbackResolversAreSet() throws { let workspace = DocumentationWorkspace() - let bundle = try testBundle(named: "DoNotUseInNewTests") + let bundle = try testBundle(named: "LegacyBundle_DoNotUseInNewTests") let dataProvider = PrebuiltLocalFileSystemDataProvider(bundles: [bundle]) try workspace.registerProvider(dataProvider) let context = try DocumentationContext(dataProvider: workspace) @@ -220,7 +220,7 @@ class ExternalReferenceResolverTests: XCTestCase { } func testLoadEntityForExternalReference() throws { - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : TestExternalReferenceResolver()]) + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : TestExternalReferenceResolver()]) let identifier = ResolvedTopicReference(bundleID: "com.external.testbundle", path: "/externally/resolved/path", sourceLanguage: .swift) XCTAssertThrowsError(try context.entity(with: ResolvedTopicReference(bundleID: "some.other.bundle", path: identifier.path, sourceLanguage: .swift))) @@ -251,7 +251,7 @@ class ExternalReferenceResolverTests: XCTestCase { externalResolver.resolvedEntityTitle = "ClassName" externalResolver.resolvedEntityKind = resolvedEntityKind - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) let converter = DocumentationNodeConverter(bundle: bundle, context: context) let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorial", sourceLanguage: .swift)) @@ -293,7 +293,7 @@ class ExternalReferenceResolverTests: XCTestCase { .init(kind: .identifier, spelling: "ClassName", preciseIdentifier: nil), ]) - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in try """ # ``SideKit/SideClass`` @@ -385,7 +385,7 @@ class ExternalReferenceResolverTests: XCTestCase { externalResolver.resolvedEntityTitle = "Name of Sample" externalResolver.resolvedEntityKind = .sampleCode - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [externalResolver.bundleID: externalResolver]) { url in try """ # ``SideKit/SideClass`` @@ -595,7 +595,7 @@ class ExternalReferenceResolverTests: XCTestCase { "/externally/resolved/path/to/article2": .success(.init(referencePath: "/externally/resolved/path/to/article2")), ] - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [ + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [ "com.external.testbundle" : resolver ]) { url in // Add external links to the MyKit Topics. @@ -627,7 +627,7 @@ class ExternalReferenceResolverTests: XCTestCase { // Tests that external references are resolved in tutorial content func testResolveExternalReferenceInTutorials() throws { let resolver = TestExternalReferenceResolver() - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: ["com.external.bundle": resolver, "com.external.testbundle": resolver], configureBundle: { (bundleURL) in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: ["com.external.bundle": resolver, "com.external.testbundle": resolver], configureBundle: { (bundleURL) in // Replace TestTutorial.tutorial with a copy that includes a bunch of external links try FileManager.default.removeItem(at: bundleURL.appendingPathComponent("TestTutorial.tutorial")) try FileManager.default.copyItem( @@ -716,7 +716,7 @@ class ExternalReferenceResolverTests: XCTestCase { // Copy the test bundle and add external links to the MyKit See Also. // We're using a See Also group, because external links aren't rendered in Topics groups. - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : resolver]) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : resolver]) { url in try """ # ``MyKit`` MyKit module root symbol @@ -802,7 +802,7 @@ class ExternalReferenceResolverTests: XCTestCase { resolver.expectedFragment = "67890" // Prepare a test bundle - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : resolver], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: ["com.external.testbundle" : resolver], externalSymbolResolver: nil, configureBundle: { url in // Add external link with fragment let myClassMDURL = url.appendingPathComponent("documentation").appendingPathComponent("myclass.md") try String(contentsOf: myClassMDURL) diff --git a/Tests/SwiftDocCTests/Infrastructure/InheritIntroducedAvailabilityTests.swift b/Tests/SwiftDocCTests/Infrastructure/InheritIntroducedAvailabilityTests.swift index 9fe1d36d49..fdf3147144 100644 --- a/Tests/SwiftDocCTests/Infrastructure/InheritIntroducedAvailabilityTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/InheritIntroducedAvailabilityTests.swift @@ -39,7 +39,7 @@ class InheritIntroducedAvailabilityTests: XCTestCase { override func setUpWithError() throws { try super.setUpWithError() - (testBundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + (testBundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") } override func tearDown() { diff --git a/Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift b/Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift index ee14b1f050..b982628ed6 100644 --- a/Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift @@ -1107,7 +1107,7 @@ class PathHierarchyTests: XCTestCase { } func testUnrealisticMixedTestCatalog() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let linkResolver = try XCTUnwrap(context.linkResolver.localResolver) let tree = try XCTUnwrap(linkResolver.pathHierarchy) diff --git a/Tests/SwiftDocCTests/Infrastructure/PresentationURLGeneratorTests.swift b/Tests/SwiftDocCTests/Infrastructure/PresentationURLGeneratorTests.swift index a4e7298ef0..7f36a61e9a 100644 --- a/Tests/SwiftDocCTests/Infrastructure/PresentationURLGeneratorTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/PresentationURLGeneratorTests.swift @@ -14,7 +14,7 @@ import Foundation class PresentationURLGeneratorTests: XCTestCase { func testInternalURLs() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let generator = PresentationURLGenerator(context: context, baseURL: URL(string: "https://host:1024/webPrefix")!) // Test resolved tutorial reference diff --git a/Tests/SwiftDocCTests/Infrastructure/ReferenceResolverTests.swift b/Tests/SwiftDocCTests/Infrastructure/ReferenceResolverTests.swift index 1022321563..ddb663ec37 100644 --- a/Tests/SwiftDocCTests/Infrastructure/ReferenceResolverTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/ReferenceResolverTests.swift @@ -78,7 +78,7 @@ class ReferenceResolverTests: XCTestCase { // Tests all reference syntax formats to a child symbol func testReferencesToChildFromFramework() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit`` @@ -111,7 +111,7 @@ class ReferenceResolverTests: XCTestCase { // Test relative paths to non-child symbol func testReferencesToGrandChildFromFramework() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit`` @@ -137,7 +137,7 @@ class ReferenceResolverTests: XCTestCase { // Test references to a sibling symbol func testReferencesToSiblingFromFramework() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit/SideClass/myFunction()`` @@ -163,7 +163,7 @@ class ReferenceResolverTests: XCTestCase { // Test references to symbols in root paths func testReferencesToTutorial() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit/SideClass/myFunction()`` @@ -189,7 +189,7 @@ class ReferenceResolverTests: XCTestCase { // Test references to technology pages func testReferencesToTechnologyPages() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit/SideClass/myFunction()`` @@ -214,7 +214,7 @@ class ReferenceResolverTests: XCTestCase { // Test external references func testExternalReferencesConsiderBundleIdentifier() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit/SideClass/myFunction()`` @@ -321,7 +321,7 @@ class ReferenceResolverTests: XCTestCase { """ // TestBundle has more than one module, so automatic registration and curation won't happen - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in referencingArticleURL = root.appendingPathComponent("article.md") try source.write(to: referencingArticleURL, atomically: true, encoding: .utf8) @@ -612,7 +612,7 @@ class ReferenceResolverTests: XCTestCase { } func testForwardsSymbolPropertiesThatAreUnmodifiedDuringLinkResolution() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var resolver = ReferenceResolver(context: context, bundle: bundle) diff --git a/Tests/SwiftDocCTests/Infrastructure/Symbol Link Resolution/AbsoluteSymbolLinkTests.swift b/Tests/SwiftDocCTests/Infrastructure/Symbol Link Resolution/AbsoluteSymbolLinkTests.swift index d8a072e213..47ef5ef172 100644 --- a/Tests/SwiftDocCTests/Infrastructure/Symbol Link Resolution/AbsoluteSymbolLinkTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/Symbol Link Resolution/AbsoluteSymbolLinkTests.swift @@ -223,7 +223,7 @@ class AbsoluteSymbolLinkTests: XCTestCase { } func testCompileSymbolGraphAndValidateLinks() throws { - let (_, _, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, _, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let expectedDescriptions = [ // doc://org.swift.docc.example/documentation/FillIntroduced: """ diff --git a/Tests/SwiftDocCTests/Infrastructure/SymbolGraph/SymbolGraphLoaderTests.swift b/Tests/SwiftDocCTests/Infrastructure/SymbolGraph/SymbolGraphLoaderTests.swift index 2bb3b8e55c..4a97349758 100644 --- a/Tests/SwiftDocCTests/Infrastructure/SymbolGraph/SymbolGraphLoaderTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/SymbolGraph/SymbolGraphLoaderTests.swift @@ -119,7 +119,7 @@ class SymbolGraphLoaderTests: XCTestCase { let tempURL = try createTemporaryDirectory() let symbolGraphSourceURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json") var symbolGraph = try JSONDecoder().decode(SymbolGraph.self, from: try Data(contentsOf: symbolGraphSourceURL)) @@ -148,7 +148,7 @@ class SymbolGraphLoaderTests: XCTestCase { /// Tests if we detect correctly a Mac Catalyst graph func testLoadingiOSAndCatalystGraphs() throws { func testBundleCopy(iOSSymbolGraphName: String, catalystSymbolGraphName: String) throws -> (URL, DocumentationBundle, DocumentationContext) { - return try testBundleAndContext(copying: "DoNotUseInNewTests", configureBundle: { bundleURL in + return try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", configureBundle: { bundleURL in // Create an iOS symbol graph file let iOSGraphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") let renamediOSGraphURL = bundleURL.appendingPathComponent(iOSSymbolGraphName) @@ -214,7 +214,7 @@ class SymbolGraphLoaderTests: XCTestCase { // Tests if main and bystanders graphs are loaded func testLoadingModuleBystanderExtensions() throws { - let (_, bundle, _) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [:]) { url in + let (_, bundle, _) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [:]) { url in let bystanderSymbolGraphURL = Bundle.module.url( forResource: "MyKit@Foundation@_MyKit_Foundation.symbols", withExtension: "json", subdirectory: "Test Resources")! try FileManager.default.copyItem(at: bystanderSymbolGraphURL, to: url.appendingPathComponent("MyKit@Foundation@_MyKit_Foundation.symbols.json")) diff --git a/Tests/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift b/Tests/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift index b70054b7b6..409a160cdf 100644 --- a/Tests/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift +++ b/Tests/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift @@ -151,7 +151,7 @@ class ExternalLinkableTests: XCTestCase { } func testSymbolSummaries() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let converter = DocumentationNodeConverter(bundle: bundle, context: context) do { let symbolReference = ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/documentation/MyKit/MyClass", sourceLanguage: .swift) @@ -313,7 +313,7 @@ class ExternalLinkableTests: XCTestCase { } func testTopicImageReferences() throws { - let (url, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (url, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in let extensionFile = """ # ``MyKit/MyClass/myFunction()`` diff --git a/Tests/SwiftDocCTests/Model/RenderContentMetadataTests.swift b/Tests/SwiftDocCTests/Model/RenderContentMetadataTests.swift index 29b146cfe6..e4d2ec5a9b 100644 --- a/Tests/SwiftDocCTests/Model/RenderContentMetadataTests.swift +++ b/Tests/SwiftDocCTests/Model/RenderContentMetadataTests.swift @@ -67,7 +67,7 @@ class RenderContentMetadataTests: XCTestCase { } func testRenderingTables() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -108,7 +108,7 @@ class RenderContentMetadataTests: XCTestCase { } func testRenderingTableSpans() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -161,7 +161,7 @@ class RenderContentMetadataTests: XCTestCase { } func testRenderingTableColumnAlignments() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -203,7 +203,7 @@ class RenderContentMetadataTests: XCTestCase { /// Verifies that a table with `nil` alignments and a table with all-unset alignments still compare as equal. func testRenderedTableEquality() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -229,7 +229,7 @@ class RenderContentMetadataTests: XCTestCase { /// Verifies that two tables with otherwise-identical contents but different column alignments compare as unequal. func testRenderedTableInequality() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let decodedTableWithUnsetColumns: RenderBlockContent.Table @@ -276,7 +276,7 @@ class RenderContentMetadataTests: XCTestCase { } func testStrikethrough() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -299,7 +299,7 @@ class RenderContentMetadataTests: XCTestCase { } func testHeadingAnchorShouldBeEncoded() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var renderContentCompiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ diff --git a/Tests/SwiftDocCTests/Model/RenderHierarchyTranslatorTests.swift b/Tests/SwiftDocCTests/Model/RenderHierarchyTranslatorTests.swift index 7266d69049..d8ec9f7792 100644 --- a/Tests/SwiftDocCTests/Model/RenderHierarchyTranslatorTests.swift +++ b/Tests/SwiftDocCTests/Model/RenderHierarchyTranslatorTests.swift @@ -13,7 +13,7 @@ import XCTest class RenderHierarchyTranslatorTests: XCTestCase { func test() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let technologyReference = ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/TestOverview", sourceLanguage: .swift) var translator = RenderHierarchyTranslator(context: context, bundle: bundle) @@ -89,7 +89,7 @@ class RenderHierarchyTranslatorTests: XCTestCase { func testMultiplePaths() throws { // Curate "TestTutorial" under MyKit as well as TechnologyX. - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let myKitURL = root.appendingPathComponent("documentation/mykit.md") let text = try String(contentsOf: myKitURL).replacingOccurrences(of: "## Topics", with: """ ## Topics diff --git a/Tests/SwiftDocCTests/Model/RenderNodeDiffingBundleTests.swift b/Tests/SwiftDocCTests/Model/RenderNodeDiffingBundleTests.swift index b673c82acf..66795478a1 100644 --- a/Tests/SwiftDocCTests/Model/RenderNodeDiffingBundleTests.swift +++ b/Tests/SwiftDocCTests/Model/RenderNodeDiffingBundleTests.swift @@ -12,7 +12,7 @@ import XCTest @testable import SwiftDocC class RenderNodeDiffingBundleTests: XCTestCase { - let testBundleName = "DoNotUseInNewTests" + let testBundleName = "LegacyBundle_DoNotUseInNewTests" let testBundleID: DocumentationBundle.Identifier = "org.swift.docc.example" func testDiffSymbolFromBundleWithDiscussionSectionRemoved() throws { diff --git a/Tests/SwiftDocCTests/Model/RenderNodeSerializationTests.swift b/Tests/SwiftDocCTests/Model/RenderNodeSerializationTests.swift index 6190cac555..5c61beb83d 100644 --- a/Tests/SwiftDocCTests/Model/RenderNodeSerializationTests.swift +++ b/Tests/SwiftDocCTests/Model/RenderNodeSerializationTests.swift @@ -92,7 +92,7 @@ class RenderNodeSerializationTests: XCTestCase { } func testBundleRoundTrip() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorial", sourceLanguage: .swift)) guard let tutorialDirective = node.markup as? BlockDirective else { @@ -115,7 +115,7 @@ class RenderNodeSerializationTests: XCTestCase { } func testTutorialArticleRoundTrip() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorialArticle", sourceLanguage: .swift)) guard let articleDirective = node.markup as? BlockDirective else { @@ -140,7 +140,7 @@ class RenderNodeSerializationTests: XCTestCase { func testAssetReferenceDictionary() throws { typealias JSONDictionary = [String: Any] - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorial", sourceLanguage: .swift)) guard let tutorialDirective = node.markup as? BlockDirective else { @@ -192,7 +192,7 @@ class RenderNodeSerializationTests: XCTestCase { } func testDiffAvailability() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorialArticle", sourceLanguage: .swift)) guard let articleDirective = node.markup as? BlockDirective else { diff --git a/Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift b/Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift index 91314db365..d02e76056a 100644 --- a/Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift +++ b/Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift @@ -16,7 +16,7 @@ import SwiftDocCTestUtilities class SemaToRenderNodeTests: XCTestCase { func testCompileTutorial() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorial", sourceLanguage: .swift)) guard let tutorialDirective = node.markup as? BlockDirective else { @@ -401,7 +401,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testTutorialBackgroundComesFromImageOrVideoPoster() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") func assertTutorialWithPath(_ tutorialPath: String, hasBackground backgroundIdentifier: String) throws { let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: tutorialPath, sourceLanguage: .swift)) @@ -431,7 +431,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testCompileTutorialArticle() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TestTutorialArticle", sourceLanguage: .swift)) let article = node.semantic as! TutorialArticle @@ -492,12 +492,12 @@ class SemaToRenderNodeTests: XCTestCase { } func testCompileOverviewWithNoVolumes() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") try assertCompileOverviewWithNoVolumes(bundle: bundle, context: context) } func testCompileOverviewWithEmptyChapter() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try """ @Tutorials(name: "Technology X") { @Intro(title: "Technology X") { @@ -718,7 +718,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testCompileOverviewWithVolumes() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in let overviewURL = root.appendingPathComponent("TestOverview.tutorial") let text = """ @Tutorials(name: "Technology X") { @@ -927,7 +927,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testCompileSymbol() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in // Remove the SideClass sub heading to match the expectations of this test let graphURL = url.appendingPathComponent("sidekit.symbols.json") var graph = try JSONDecoder().decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -1224,7 +1224,7 @@ class SemaToRenderNodeTests: XCTestCase { } let testBundleURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let (_, bundle, context) = try loadBundle( from: testBundleURL, externalResolvers: ["com.test.external": TestReferenceResolver()], @@ -1325,7 +1325,7 @@ class SemaToRenderNodeTests: XCTestCase { // Check for constraints in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass/myFunction()", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -1378,7 +1378,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testRenderConditionalConstraintsOnConformingType() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyProtocol", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference) @@ -1400,7 +1400,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testRenderConditionalConstraintsOnProtocol() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference) @@ -1422,7 +1422,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testRenderReferenceResolving() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) // Compile docs and verify contents @@ -1487,7 +1487,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testAvailabilityMetadata() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) // Compile docs and verify contents @@ -1535,7 +1535,7 @@ class SemaToRenderNodeTests: XCTestCase { // Override with both a low and a high value for version in [SymbolGraph.SemanticVersion(major: 1, minor: 1, patch: 1), SymbolGraph.SemanticVersion(major: 99, minor: 99, patch: 99)] { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in // Duplicate the symbol graph let myKitURL = url.appendingPathComponent("mykit-iOS.symbols.json") let myClassUSR = "s:5MyKit0A5ClassC" @@ -1587,7 +1587,7 @@ class SemaToRenderNodeTests: XCTestCase { } func testMediaReferencesWithSpaces() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/Test-Bundle/TutorialMediaWithSpaces", sourceLanguage: .swift)) guard let tutorialDirective = node.markup as? BlockDirective else { @@ -1648,7 +1648,7 @@ Document @1:1-11:19 """, markup.debugDescription(options: .printSourceLocations)) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var contentTranslator = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/TestTutorial", sourceLanguage: .swift)) let renderContent = try XCTUnwrap(markup.children.reduce(into: [], { result, item in result.append(contentsOf: contentTranslator.visit(item))}) as? [RenderBlockContent]) let expectedContent: [RenderBlockContent] = [ @@ -1690,7 +1690,7 @@ Document """, markup.debugDescription()) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var contentTranslator = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/TestTutorial", sourceLanguage: .swift)) let renderContent = try XCTUnwrap(markup.children.reduce(into: [], { result, item in result.append(contentsOf: contentTranslator.visit(item))}) as? [RenderBlockContent]) let expectedContent: [RenderBlockContent] = [ @@ -1715,14 +1715,14 @@ Document let document = Document(parsing: markupSource, options: []) let node = DocumentationNode(reference: ResolvedTopicReference(bundleID: "org.swift.docc", path: "/blah", sourceLanguage: .swift), kind: .article, sourceLanguage: .swift, name: .conceptual(title: "Title"), markup: document, semantic: Semantic()) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference) XCTAssertNotNil(translator.visit(MarkupContainer(document.children))) } func testCompileSymbolMetadata() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyProtocol", sourceLanguage: .swift)) // Compile docs and verify contents @@ -1822,7 +1822,7 @@ Document private func renderNodeForArticleInTestBundle(content: String) throws -> RenderNode { // Overwrite the article so we can test the article eyebrow for articles without task groups let sourceURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory().appendingPathComponent("test.docc") try FileManager.default.copyItem(at: sourceURL, to: targetURL) @@ -1935,7 +1935,7 @@ Document } configuration.externalMetadata.currentPlatforms = currentPlatforms - let (_, bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests", configuration: configuration) + let (_, bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests", configuration: configuration) let reference = ResolvedTopicReference(bundleID: bundle.id, path: referencePath, sourceLanguage: .swift) return (bundle, context, reference) @@ -2104,7 +2104,7 @@ Document } func testRendersDeprecatedViolator() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Make the referenced symbol deprecated do { @@ -2127,7 +2127,7 @@ Document } func testDoesNotRenderDeprecatedViolator() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Make the referenced symbol deprecated do { @@ -2151,7 +2151,7 @@ Document } func testRendersDeprecatedViolatorForUnconditionallyDeprecatedReference() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Make the referenced symbol deprecated do { @@ -2177,7 +2177,7 @@ Document func testRenderMetadataFragments() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -2197,7 +2197,7 @@ Document } func testRenderMetadataExtendedModule() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass/myFunction()", sourceLanguage: .swift)) let symbol = try XCTUnwrap(node.semantic as? Symbol) @@ -2208,7 +2208,7 @@ Document } func testDefaultImplementations() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Verify that the render reference to a required symbol includes the 'required' key and the number of default implementations provided. do { @@ -2241,7 +2241,7 @@ Document } func testDefaultImplementationsNotListedInTopics() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Verify that a required symbol does not include default implementations in Topics groups do { @@ -2259,7 +2259,7 @@ Document func testNoStringMetadata() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -2288,7 +2288,7 @@ Document func testRenderDeclarations() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -2307,7 +2307,7 @@ Document func testDocumentationRenderReferenceRoles() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -2327,7 +2327,7 @@ Document func testTutorialsRenderReferenceRoles() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/tutorials/TestOverview", sourceLanguage: .swift)) let symbol = node.semantic as! TutorialTableOfContents @@ -2346,7 +2346,7 @@ Document func testRemovingTrailingNewLinesInDeclaration() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/globalFunction(_:considering:)", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol @@ -2369,7 +2369,7 @@ Document func testRenderManualSeeAlsoInArticles() throws { // Check for fragments in metadata in render node - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/Test-Bundle/article", sourceLanguage: .swift)) let article = node.semantic as! Article @@ -2392,7 +2392,7 @@ Document func testSafeSectionAnchorNames() throws { // Check that heading's anchor was safe-ified - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyClass/myFunction()", sourceLanguage: .swift)) let symbol = node.semantic as! Symbol var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference) @@ -2412,7 +2412,7 @@ Document } func testDuplicateNavigatorTitleIsRemoved() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let myFuncReference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/globalFunction(_:considering:)", sourceLanguage: .swift) let node = try context.entity(with: myFuncReference) @@ -2428,7 +2428,7 @@ Document } func testNonDuplicateNavigatorTitleIsRendered() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let myFuncReference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/MyProtocol", sourceLanguage: .swift) let node = try context.entity(with: myFuncReference) @@ -2471,7 +2471,7 @@ Document ] func testBareTechnology() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try """ @Tutorials(name: "<#text#>") { @Intro(title: "<#text#>") { @@ -2526,7 +2526,7 @@ Document } func testBareTutorial() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try """ @Tutorial(time: <#number#>, projectFiles: <#.zip#>) { @Intro(title: "<#text#>") { @@ -2604,7 +2604,7 @@ Document func testRenderAsides() throws { let asidesSGFURL = Bundle.module.url( forResource: "Asides.symbols", withExtension: "json", subdirectory: "Test Resources")! - let (bundleURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { url in + let (bundleURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { url in try? FileManager.default.copyItem(at: asidesSGFURL, to: url.appendingPathComponent("Asides.symbols.json")) } defer { @@ -2632,7 +2632,7 @@ Document /// Tests parsing origin data from symbol graph. func testOriginMetadata() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let myFuncReference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/SideKit/SideClass/Element/inherited()", sourceLanguage: .swift) let node = try context.entity(with: myFuncReference) @@ -2647,9 +2647,9 @@ Document /// Tests that we inherit docs by default from within the same module. func testDocInheritanceInsideModule() throws { let sgURL = Bundle.module.url( - forResource: "DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in // Replace the out-of-bundle origin with a symbol from the same bundle. try String(contentsOf: sgURL) .replacingOccurrences(of: #"identifier" : "s:OriginalUSR"#, with: #"identifier" : "s:5MyKit0A5MyProtocol0Afunc()"#) @@ -2673,9 +2673,9 @@ Document /// Tests that we don't inherit docs by default from within the same bundle but not module. func testDocInheritanceInsideBundleButNotModule() throws { let sgURL = Bundle.module.url( - forResource: "DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in // Replace the out-of-bundle origin with a symbol from the same bundle but // from the MyKit module. try String(contentsOf: sgURL) @@ -2698,7 +2698,7 @@ Document } /// Tests that we generated an automatic abstract and remove source docs. func testDisabledDocInheritance() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") // Verify that the inherited docs which should be ignored are not reference resolved. // Verify inherited docs are reference resolved and their problems are recorded. @@ -2729,7 +2729,7 @@ Document /// Tests doc extensions are matched to inherited symbols func testInheritedSymbolDocExtension() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try? """ # ``SideKit/SideClass/Element/inherited()`` Doc extension abstract. @@ -2870,9 +2870,9 @@ Document ] for testData in testData { - let sgURL = Bundle.module.url(forResource: "DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! + let sgURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests.docc/sidekit.symbols", withExtension: "json", subdirectory: "Test Bundles")! - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in // Replace the out-of-bundle origin with a symbol from the same bundle but // from the MyKit module. var graph = try JSONDecoder().decode(SymbolGraph.self, from: Data(contentsOf: sgURL)) @@ -2901,7 +2901,7 @@ Document /// Tests that we inherit docs when the feature is enabled. func testEnabledDocInheritance() throws { let bundleURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! var configuration = DocumentationContext.Configuration() configuration.externalMetadata.inheritDocs = true @@ -2946,7 +2946,7 @@ Document // Verifies that undocumented symbol gets a nil abstract. func testNonDocumentedSymbolNilAbstract() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let reference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/MyKit/globalFunction(_:considering:)", sourceLanguage: .swift) let node = try context.entity(with: reference) @@ -3054,7 +3054,7 @@ Document /// Tests links to symbols that have deprecation summary in markdown appear deprecated. func testLinkToDeprecatedSymbolViaDirectiveIsDeprecated() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``MyKit/MyProtocol`` @DeprecationSummary { @@ -3074,7 +3074,7 @@ Document } func testCustomSymbolDisplayNames() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``MyKit`` @@ -3204,7 +3204,7 @@ Document } func testVisitTutorialMediaWithoutExtension() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try """ @Tutorials(name: "Technology X") { @Intro(title: "Technology X") { @@ -3251,7 +3251,7 @@ Document func testTopicsSectionWithAnonymousTopicGroup() throws { let (_, bundle, context) = try testBundleAndContext( - copying: "DoNotUseInNewTests", + copying: "LegacyBundle_DoNotUseInNewTests", configureBundle: { url in try """ # Article diff --git a/Tests/SwiftDocCTests/Rendering/AutomaticSeeAlsoTests.swift b/Tests/SwiftDocCTests/Rendering/AutomaticSeeAlsoTests.swift index 88e4d19ed9..2ce82d8703 100644 --- a/Tests/SwiftDocCTests/Rendering/AutomaticSeeAlsoTests.swift +++ b/Tests/SwiftDocCTests/Rendering/AutomaticSeeAlsoTests.swift @@ -18,7 +18,7 @@ class AutomaticSeeAlsoTests: XCTestCase { /// Test that a symbol with no authored See Also and with no curated siblings /// does not have a See Also section. func testNoSeeAlso() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Extension that curates `SideClass` try """ # ``SideKit`` @@ -41,7 +41,7 @@ class AutomaticSeeAlsoTests: XCTestCase { /// Test that a symbol with authored See Also and with no curated siblings /// does include an authored See Also section func testAuthoredSeeAlso() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Extension that curates `SideClass` try """ # ``SideKit`` @@ -77,7 +77,7 @@ class AutomaticSeeAlsoTests: XCTestCase { /// Test that a symbol with authored See Also and with curated siblings /// does include both in See Also with authored section first func testAuthoredAndAutomaticSeeAlso() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Extension that curates `SideClass` try """ # ``SideKit`` @@ -138,7 +138,7 @@ class AutomaticSeeAlsoTests: XCTestCase { // Duplicate of the `testAuthoredAndAutomaticSeeAlso()` test above // but with automatic see also creation disabled func testAuthoredSeeAlsoWithDisabledAutomaticSeeAlso() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit`` @@ -201,7 +201,7 @@ class AutomaticSeeAlsoTests: XCTestCase { // Duplicate of the `testAuthoredAndAutomaticSeeAlso()` test above // but with automatic see also creation globally disabled func testAuthoredSeeAlsoWithGloballyDisabledAutomaticSeeAlso() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { root in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { root in /// Article that curates `SideClass` try """ # ``SideKit`` diff --git a/Tests/SwiftDocCTests/Rendering/AvailabilityRenderOrderTests.swift b/Tests/SwiftDocCTests/Rendering/AvailabilityRenderOrderTests.swift index f75de8491c..0e91aa65e3 100644 --- a/Tests/SwiftDocCTests/Rendering/AvailabilityRenderOrderTests.swift +++ b/Tests/SwiftDocCTests/Rendering/AvailabilityRenderOrderTests.swift @@ -17,7 +17,7 @@ class AvailabilityRenderOrderTests: XCTestCase { forResource: "Availability.symbols", withExtension: "json", subdirectory: "Test Resources")! func testSortingAtRenderTime() throws { - let (bundleURL, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { url in + let (bundleURL, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { url in try? FileManager.default.copyItem(at: self.availabilitySGFURL, to: url.appendingPathComponent("Availability.symbols.json")) } defer { diff --git a/Tests/SwiftDocCTests/Rendering/ConstraintsRenderSectionTests.swift b/Tests/SwiftDocCTests/Rendering/ConstraintsRenderSectionTests.swift index 02e7ecad80..f517383200 100644 --- a/Tests/SwiftDocCTests/Rendering/ConstraintsRenderSectionTests.swift +++ b/Tests/SwiftDocCTests/Rendering/ConstraintsRenderSectionTests.swift @@ -19,7 +19,7 @@ fileprivate let jsonEncoder = JSONEncoder() class ConstraintsRenderSectionTests: XCTestCase { func testSingleConstraint() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -49,7 +49,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testSingleRedundantConstraint() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -78,7 +78,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testSingleRedundantConstraintForLeaves() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -107,7 +107,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testPreservesNonRedundantConstraints() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -137,7 +137,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testGroups2Constraints() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -167,7 +167,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testGroups3Constraints() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -198,7 +198,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testRenderReferences() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) @@ -236,7 +236,7 @@ class ConstraintsRenderSectionTests: XCTestCase { } func testRenderReferencesWithNestedTypeInSelf() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { bundleURL in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { bundleURL in // Add constraints to `MyClass` let graphURL = bundleURL.appendingPathComponent("mykit-iOS.symbols.json") var graph = try jsonDecoder.decode(SymbolGraph.self, from: try Data(contentsOf: graphURL)) diff --git a/Tests/SwiftDocCTests/Rendering/DefaultAvailabilityTests.swift b/Tests/SwiftDocCTests/Rendering/DefaultAvailabilityTests.swift index 5326e37de7..4f0e01ca41 100644 --- a/Tests/SwiftDocCTests/Rendering/DefaultAvailabilityTests.swift +++ b/Tests/SwiftDocCTests/Rendering/DefaultAvailabilityTests.swift @@ -34,7 +34,7 @@ class DefaultAvailabilityTests: XCTestCase { // Test whether the default availability is loaded from Info.plist and applied during render time func testBundleWithDefaultAvailability() throws { // Copy an Info.plist with default availability - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { (url) in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { (url) in try? FileManager.default.removeItem(at: url.appendingPathComponent("Info.plist")) try? FileManager.default.copyItem(at: self.infoPlistAvailabilityURL, to: url.appendingPathComponent("Info.plist")) @@ -177,7 +177,7 @@ class DefaultAvailabilityTests: XCTestCase { // Set a beta status for the docs (which would normally be set via command line argument) configuration.externalMetadata.currentPlatforms = ["macOS": PlatformVersion(VersionTriplet(10, 16, 0), beta: true)] - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", configuration: configuration) { (url) in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", configuration: configuration) { (url) in // Copy an Info.plist with default availability of macOS 10.15.1 try? FileManager.default.removeItem(at: url.appendingPathComponent("Info.plist")) try? FileManager.default.copyItem(at: self.infoPlistAvailabilityURL, to: url.appendingPathComponent("Info.plist")) @@ -202,7 +202,7 @@ class DefaultAvailabilityTests: XCTestCase { var configuration = DocumentationContext.Configuration() // Set a beta status for the docs (which would normally be set via command line argument) configuration.externalMetadata.currentPlatforms = ["iOS": PlatformVersion(VersionTriplet(14, 0, 0), beta: true)] - let (_, bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests", configuration: configuration) + let (_, bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests", configuration: configuration) do { let identifier = ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/documentation/MyKit/MyClass/myFunction()", fragment: nil, sourceLanguage: .swift) diff --git a/Tests/SwiftDocCTests/Rendering/DefaultCodeListingSyntaxTests.swift b/Tests/SwiftDocCTests/Rendering/DefaultCodeListingSyntaxTests.swift index 2b053a3121..9039b2296d 100644 --- a/Tests/SwiftDocCTests/Rendering/DefaultCodeListingSyntaxTests.swift +++ b/Tests/SwiftDocCTests/Rendering/DefaultCodeListingSyntaxTests.swift @@ -34,7 +34,7 @@ class DefaultCodeBlockSyntaxTests: XCTestCase { return renderNode.primaryContentSections.first! as! ContentRenderSection } - let (_, bundleWithLanguageDefault, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, bundleWithLanguageDefault, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") testBundleWithLanguageDefault = bundleWithLanguageDefault diff --git a/Tests/SwiftDocCTests/Rendering/DeprecationSummaryTests.swift b/Tests/SwiftDocCTests/Rendering/DeprecationSummaryTests.swift index 238b4a96ea..8bede3a237 100644 --- a/Tests/SwiftDocCTests/Rendering/DeprecationSummaryTests.swift +++ b/Tests/SwiftDocCTests/Rendering/DeprecationSummaryTests.swift @@ -31,7 +31,7 @@ class DeprecationSummaryTests: XCTestCase { /// This test verifies that a symbol's deprecation summary comes from its sidecar doc /// and it's preferred over the original deprecation note in the code docs. func testAuthoredDeprecatedSummary() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/SideKit/SideClass/init()", sourceLanguage: .swift)) // Compile docs and verify contents @@ -44,7 +44,7 @@ class DeprecationSummaryTests: XCTestCase { /// Test for a warning when symbol is not deprecated func testIncorrectlyAuthoredDeprecatedSummary() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in // Add a sidecar file with wrong deprecated summary try """ # ``SideKit/SideClass`` diff --git a/Tests/SwiftDocCTests/Rendering/ExternalLinkTitleTests.swift b/Tests/SwiftDocCTests/Rendering/ExternalLinkTitleTests.swift index dc4a4835e2..20010942e4 100644 --- a/Tests/SwiftDocCTests/Rendering/ExternalLinkTitleTests.swift +++ b/Tests/SwiftDocCTests/Rendering/ExternalLinkTitleTests.swift @@ -24,7 +24,7 @@ public class ExternalLinkTitleTests: XCTestCase { semantic: Semantic()) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference) let result = translator.visit(MarkupContainer(document.children)) as! [RenderBlockContent] diff --git a/Tests/SwiftDocCTests/Rendering/LinkTitleResolverTests.swift b/Tests/SwiftDocCTests/Rendering/LinkTitleResolverTests.swift index c9f66a5116..2ec636ac11 100644 --- a/Tests/SwiftDocCTests/Rendering/LinkTitleResolverTests.swift +++ b/Tests/SwiftDocCTests/Rendering/LinkTitleResolverTests.swift @@ -14,7 +14,7 @@ import XCTest class LinkTitleResolverTests: XCTestCase { func testSymbolTitleResolving() throws { - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let resolver = LinkTitleResolver(context: context, source: nil) guard let reference = context.knownIdentifiers.filter({ ref -> Bool in return ref.path.hasSuffix("MyProtocol") diff --git a/Tests/SwiftDocCTests/Rendering/RenderContentCompilerTests.swift b/Tests/SwiftDocCTests/Rendering/RenderContentCompilerTests.swift index cd76f7d7e2..788d7c7386 100644 --- a/Tests/SwiftDocCTests/Rendering/RenderContentCompilerTests.swift +++ b/Tests/SwiftDocCTests/Rendering/RenderContentCompilerTests.swift @@ -15,7 +15,7 @@ import XCTest class RenderContentCompilerTests: XCTestCase { func testLinkOverrideTitle() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var compiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = """ @@ -133,7 +133,7 @@ class RenderContentCompilerTests: XCTestCase { } func testLineBreak() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var compiler = RenderContentCompiler(context: context, bundle: bundle, identifier: ResolvedTopicReference(bundleID: bundle.id, path: "/path", fragment: nil, sourceLanguage: .swift)) let source = #""" diff --git a/Tests/SwiftDocCTests/Rendering/RenderMetadataTests.swift b/Tests/SwiftDocCTests/Rendering/RenderMetadataTests.swift index 3792a69533..d27d65ed5f 100644 --- a/Tests/SwiftDocCTests/Rendering/RenderMetadataTests.swift +++ b/Tests/SwiftDocCTests/Rendering/RenderMetadataTests.swift @@ -72,7 +72,7 @@ class RenderMetadataTests: XCTestCase { func testAllPagesHaveTitleMetadata() throws { var typesOfPages = [Tutorial.self, TutorialTableOfContents.self, Article.self, TutorialArticle.self, Symbol.self] - for bundleName in ["DoNotUseInNewTests"] { + for bundleName in ["LegacyBundle_DoNotUseInNewTests"] { let (bundle, context) = try testBundleAndContext(named: bundleName) let renderContext = RenderContext(documentationContext: context, bundle: bundle) @@ -93,7 +93,7 @@ class RenderMetadataTests: XCTestCase { /// Test that a bystanders symbol graph is loaded, symbols are merged into the main module /// and the bystanders are included in the render node metadata. func testRendersBystandersFromSymbolGraph() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [:]) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [:]) { url in let bystanderSymbolGraphURL = Bundle.module.url( forResource: "MyKit@Foundation@_MyKit_Foundation.symbols", withExtension: "json", subdirectory: "Test Resources")! try FileManager.default.copyItem(at: bystanderSymbolGraphURL, to: url.appendingPathComponent("MyKit@Foundation@_MyKit_Foundation.symbols.json")) @@ -117,7 +117,7 @@ class RenderMetadataTests: XCTestCase { /// Test that when a bystanders symbol graph is loaded that extends a different module, that /// those symbols correctly report the modules when rendered. func testRendersBystanderExtensionsFromSymbolGraph() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", externalResolvers: [:]) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", externalResolvers: [:]) { url in let baseSymbolGraphURL = Bundle.module.url( forResource: "BaseKit.symbols", withExtension: "json", subdirectory: "Test Resources")! try FileManager.default.copyItem(at: baseSymbolGraphURL, to: url.appendingPathComponent("BaseKit.symbols.json")) diff --git a/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorSymbolVariantsTests.swift b/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorSymbolVariantsTests.swift index 72b99a0f5d..45b5cdcd3b 100644 --- a/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorSymbolVariantsTests.swift +++ b/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorSymbolVariantsTests.swift @@ -1177,7 +1177,7 @@ class RenderNodeTranslatorSymbolVariantsTests: XCTestCase { } private func assertMultiVariantSymbol( - bundleName: String = "DoNotUseInNewTests", + bundleName: String = "LegacyBundle_DoNotUseInNewTests", configureContext: (DocumentationContext, ResolvedTopicReference) throws -> () = { _, _ in }, configureSymbol: (Symbol) throws -> () = { _ in }, configureRenderNodeTranslator: (inout RenderNodeTranslator) -> () = { _ in }, @@ -1222,7 +1222,7 @@ class RenderNodeTranslatorSymbolVariantsTests: XCTestCase { assertAfterApplyingVariant: (RenderNode) throws -> () = { _ in }, assertDataAfterApplyingVariant: (Data) throws -> () = { _ in } ) throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") let identifier = ResolvedTopicReference( bundleID: bundle.id, diff --git a/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorTests.swift b/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorTests.swift index 24a6b51fc5..b0b267ab05 100644 --- a/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorTests.swift +++ b/Tests/SwiftDocCTests/Rendering/RenderNodeTranslatorTests.swift @@ -17,7 +17,7 @@ import SymbolKit class RenderNodeTranslatorTests: XCTestCase { private func findDiscussion(forSymbolPath: String, configureBundle: ((URL) throws -> Void)? = nil) throws -> ContentRenderSection? { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", configureBundle: configureBundle) + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", configureBundle: configureBundle) let node = try context.entity(with: ResolvedTopicReference(bundleID: bundle.id, path: forSymbolPath, sourceLanguage: .swift)) @@ -223,7 +223,7 @@ class RenderNodeTranslatorTests: XCTestCase { } func testArticleRoles() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() // Verify article's role @@ -281,7 +281,7 @@ class RenderNodeTranslatorTests: XCTestCase { // Verifies that links to sections include their container's abstract rdar://72110558 func testSectionAbstracts() throws { // Create an article including a link to a tutorial section - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], configureBundle: { url in try """ # Article Article abstract @@ -303,7 +303,7 @@ class RenderNodeTranslatorTests: XCTestCase { } func testEmptyTaskGroupsNotRendered() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let source = """ @@ -365,7 +365,7 @@ class RenderNodeTranslatorTests: XCTestCase { /// Tests the ordering of automatic groups for symbols func testAutomaticTaskGroupsOrderingInSymbols() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``SideKit/SideClass`` SideClass abstract @@ -492,7 +492,7 @@ class RenderNodeTranslatorTests: XCTestCase { /// Tests the ordering of automatic groups for articles func testAutomaticTaskGroupsOrderingInArticles() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # Article Article abstract @@ -599,7 +599,7 @@ class RenderNodeTranslatorTests: XCTestCase { /// Tests the ordering of automatic groups in defining protocol func testOrderingOfAutomaticGroupsInDefiningProtocol() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in // }) @@ -649,7 +649,7 @@ class RenderNodeTranslatorTests: XCTestCase { forResource: "FancyProtocol.symbols", withExtension: "json", subdirectory: "Test Resources")! // Create a test bundle copy with the symbol graph from above - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: []) { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: []) { url in try? FileManager.default.copyItem(at: fancyProtocolSGFURL, to: url.appendingPathComponent("FancyProtocol.symbols.json")) } @@ -885,7 +885,7 @@ class RenderNodeTranslatorTests: XCTestCase { // Verifies we don't render links to non linkable nodes. func testNonLinkableNodes() throws { // Create a bundle with variety absolute and relative links and symbol links to a non linkable node. - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``SideKit/SideClass`` Abstract. @@ -925,7 +925,7 @@ class RenderNodeTranslatorTests: XCTestCase { func testLinkInAbstract() throws { do { // First verify that `SideKit` page does not contain render reference to `SideKit/SideClass/Element`. - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let reference = ResolvedTopicReference(bundleID: bundle.id, path: "/documentation/SideKit", sourceLanguage: .swift) let node = try context.entity(with: reference) @@ -940,7 +940,7 @@ class RenderNodeTranslatorTests: XCTestCase { do { // Create a bundle with a link in abstract, then verify the render reference is present in `SideKit` render node references. - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests", excludingPaths: [], externalResolvers: [:], externalSymbolResolver: nil, configureBundle: { url in try """ # ``SideKit/SideClass`` This is a link to . diff --git a/Tests/SwiftDocCTests/Rendering/RoleTests.swift b/Tests/SwiftDocCTests/Rendering/RoleTests.swift index ad068788d9..2bea97e3de 100644 --- a/Tests/SwiftDocCTests/Rendering/RoleTests.swift +++ b/Tests/SwiftDocCTests/Rendering/RoleTests.swift @@ -25,7 +25,7 @@ class RoleTests: XCTestCase { ] func testNodeRoles() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") // Compile docs and verify contents for (path, expectedRole) in expectedRoles { @@ -43,7 +43,7 @@ class RoleTests: XCTestCase { } func testDocumentationRenderReferenceRoles() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") let identifier = ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/documentation/MyKit", fragment: nil, sourceLanguage: .swift) let node = try context.entity(with: identifier) @@ -56,7 +56,7 @@ class RoleTests: XCTestCase { } func testTutorialsRenderReferenceRoles() throws { - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") let identifier = ResolvedTopicReference(bundleID: "org.swift.docc.example", path: "/tutorials/Test-Bundle/TestTutorial", fragment: nil, sourceLanguage: .swift) let node = try context.entity(with: identifier) diff --git a/Tests/SwiftDocCTests/Semantics/ChapterTests.swift b/Tests/SwiftDocCTests/Semantics/ChapterTests.swift index 0e2458c78a..257b78ec40 100644 --- a/Tests/SwiftDocCTests/Semantics/ChapterTests.swift +++ b/Tests/SwiftDocCTests/Semantics/ChapterTests.swift @@ -83,7 +83,7 @@ class ChapterTests: XCTestCase { } func testDuplicateTutorialReferences() throws { - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") /* The test bundle contains the duplicate tutorial references in TestOverview: diff --git a/Tests/SwiftDocCTests/Semantics/ImageMediaTests.swift b/Tests/SwiftDocCTests/Semantics/ImageMediaTests.swift index aeea557c54..74adaf7dcf 100644 --- a/Tests/SwiftDocCTests/Semantics/ImageMediaTests.swift +++ b/Tests/SwiftDocCTests/Semantics/ImageMediaTests.swift @@ -239,7 +239,7 @@ class ImageMediaTests: XCTestCase { func testImageDirectiveDoesNotResolveVideoReference() throws { // First check that the Video exists - let (_, videoProblems, _) = try parseDirective(VideoMedia.self, in: "DoNotUseInNewTests") { + let (_, videoProblems, _) = try parseDirective(VideoMedia.self, in: "LegacyBundle_DoNotUseInNewTests") { """ @Video(source: "introvideo") """ @@ -248,7 +248,7 @@ class ImageMediaTests: XCTestCase { XCTAssertEqual(videoProblems, []) // Then check that it doesn't resolve as an image - let (renderedContent, imageProblems, image) = try parseDirective(ImageMedia.self, in: "DoNotUseInNewTests") { + let (renderedContent, imageProblems, image) = try parseDirective(ImageMedia.self, in: "LegacyBundle_DoNotUseInNewTests") { """ @Image(source: "introvideo") """ diff --git a/Tests/SwiftDocCTests/Semantics/MarkupReferenceResolverTests.swift b/Tests/SwiftDocCTests/Semantics/MarkupReferenceResolverTests.swift index 06735315c8..5ffdbf18d4 100644 --- a/Tests/SwiftDocCTests/Semantics/MarkupReferenceResolverTests.swift +++ b/Tests/SwiftDocCTests/Semantics/MarkupReferenceResolverTests.swift @@ -14,7 +14,7 @@ import Markdown class MarkupReferenceResolverTests: XCTestCase { func testArbitraryReferenceInComment() throws { - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") let source = """ @Comment { ``hello`` and ``world`` are 2 arbitrary symbol links. diff --git a/Tests/SwiftDocCTests/Semantics/MetadataTests.swift b/Tests/SwiftDocCTests/Semantics/MetadataTests.swift index 603d9744e3..888695f31a 100644 --- a/Tests/SwiftDocCTests/Semantics/MetadataTests.swift +++ b/Tests/SwiftDocCTests/Semantics/MetadataTests.swift @@ -414,7 +414,7 @@ class MetadataTests: XCTestCase { line: UInt = #line ) throws -> (problems: [String], metadata: Metadata) { let document = Document(parsing: source, options: [.parseBlockDirectives, .parseSymbolLinks]) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var analyzer = SemanticAnalyzer(source: nil, context: context, bundle: bundle) _ = analyzer.visit(document) diff --git a/Tests/SwiftDocCTests/Semantics/MultipleChoiceTests.swift b/Tests/SwiftDocCTests/Semantics/MultipleChoiceTests.swift index 87351e2864..8fb02a273d 100644 --- a/Tests/SwiftDocCTests/Semantics/MultipleChoiceTests.swift +++ b/Tests/SwiftDocCTests/Semantics/MultipleChoiceTests.swift @@ -19,7 +19,7 @@ class MultipleChoiceTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -53,7 +53,7 @@ class MultipleChoiceTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") try directive.map { directive in var problems = [Problem]() @@ -101,7 +101,7 @@ class MultipleChoiceTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -158,7 +158,7 @@ MultipleChoice @1:1-24:2 title: 'SwiftDocC.MarkupContainer' let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -214,7 +214,7 @@ MultipleChoice @1:1-18:2 title: 'SwiftDocC.MarkupContainer' let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -274,7 +274,7 @@ MultipleChoice @1:1-22:2 title: 'SwiftDocC.MarkupContainer' let document = Document(parsing: source, options: .parseBlockDirectives) let directive = try XCTUnwrap(document.child(at: 0) as? BlockDirective) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() XCTAssertEqual(MultipleChoice.directiveName, directive.name) diff --git a/Tests/SwiftDocCTests/Semantics/RedirectedTests.swift b/Tests/SwiftDocCTests/Semantics/RedirectedTests.swift index 9e0541ab2e..289e690933 100644 --- a/Tests/SwiftDocCTests/Semantics/RedirectedTests.swift +++ b/Tests/SwiftDocCTests/Semantics/RedirectedTests.swift @@ -19,7 +19,7 @@ class RedirectedTests: XCTestCase { let source = "@Redirected" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(redirected) @@ -33,7 +33,7 @@ class RedirectedTests: XCTestCase { let source = "@Redirected(from: \(oldPath))" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(redirected) @@ -46,7 +46,7 @@ class RedirectedTests: XCTestCase { let source = "@Redirected(from: \(oldPath), argument: value)" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(redirected, "Even if there are warnings we can create a Redirected value") @@ -64,7 +64,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(redirected, "Even if there are warnings we can create a Redirected value") @@ -83,7 +83,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(redirected, "Even if there are warnings we can create a Redirected value") @@ -107,7 +107,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tutorialTableOfContents = TutorialTableOfContents(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tutorialTableOfContents, "A tutorial table-of-contents value can be created with a Redirected child.") @@ -139,7 +139,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let volume = Volume(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(volume, "A Volume value can be created with a Redirected child.") @@ -204,7 +204,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tutorial = Tutorial(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tutorial, "A Tutorial value can be created with a Redirected child.") @@ -232,7 +232,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let article = TutorialArticle(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(article, "A TutorialArticle value can be created with a Redirected child.") @@ -281,7 +281,7 @@ class RedirectedTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let article = Resources(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(article, "A Resources value can be created with a Redirected child.") @@ -302,7 +302,7 @@ class RedirectedTests: XCTestCase { ![full width image](referenced-article-image.png) """ let document = Document(parsing: source, options: .parseBlockDirectives) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let article = Article(from: document, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(article, "An Article value can be created with a Redirected child.") @@ -337,7 +337,7 @@ class RedirectedTests: XCTestCase { ![full width image](referenced-article-image.png) """ let document = Document(parsing: source, options: .parseBlockDirectives) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let article = Article(from: document, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(article, "An Article value can be created with a Redirected child.") @@ -374,7 +374,7 @@ class RedirectedTests: XCTestCase { ![full width image](referenced-article-image.png) """ let document = Document(parsing: source, options: .parseBlockDirectives) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let article = Article(from: document, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(article, "An Article value can be created with a Redirected child.") @@ -398,7 +398,7 @@ class RedirectedTests: XCTestCase { let source = "@Redirected(fromURL: /old/path)" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let redirected = Redirect(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(redirected) diff --git a/Tests/SwiftDocCTests/Semantics/Reference/LinksTests.swift b/Tests/SwiftDocCTests/Semantics/Reference/LinksTests.swift index 4dd87bffad..f2238b08d1 100644 --- a/Tests/SwiftDocCTests/Semantics/Reference/LinksTests.swift +++ b/Tests/SwiftDocCTests/Semantics/Reference/LinksTests.swift @@ -185,7 +185,7 @@ class LinksTests: XCTestCase { } do { - let (renderedContent, problems, links) = try parseDirective(Links.self, in: "DoNotUseInNewTests") { + let (renderedContent, problems, links) = try parseDirective(Links.self, in: "LegacyBundle_DoNotUseInNewTests") { """ @Links(visualStyle: compactGrid) { - ``MyKit/MyClass`` diff --git a/Tests/SwiftDocCTests/Semantics/ResourcesTests.swift b/Tests/SwiftDocCTests/Semantics/ResourcesTests.swift index f42232d42e..6bc0ccf34b 100644 --- a/Tests/SwiftDocCTests/Semantics/ResourcesTests.swift +++ b/Tests/SwiftDocCTests/Semantics/ResourcesTests.swift @@ -17,7 +17,7 @@ class ResourcesTests: XCTestCase { let source = "@\(Resources.directiveName)" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let resources = Resources(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(resources) @@ -67,7 +67,7 @@ class ResourcesTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let resources = Resources(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(resources) @@ -120,7 +120,7 @@ Resources @1:1-29:2 """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let resources = Resources(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(resources) diff --git a/Tests/SwiftDocCTests/Semantics/SectionTests.swift b/Tests/SwiftDocCTests/Semantics/SectionTests.swift index fcdfb7a8f1..0ed1e5b662 100644 --- a/Tests/SwiftDocCTests/Semantics/SectionTests.swift +++ b/Tests/SwiftDocCTests/Semantics/SectionTests.swift @@ -19,7 +19,7 @@ class TutorialSectionTests: XCTestCase { let source = "@Section" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let section = TutorialSection(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(section) diff --git a/Tests/SwiftDocCTests/Semantics/StackTests.swift b/Tests/SwiftDocCTests/Semantics/StackTests.swift index 184c1aeb35..a6e5104255 100644 --- a/Tests/SwiftDocCTests/Semantics/StackTests.swift +++ b/Tests/SwiftDocCTests/Semantics/StackTests.swift @@ -19,7 +19,7 @@ class StackTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -48,7 +48,7 @@ class StackTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -78,7 +78,7 @@ class StackTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() diff --git a/Tests/SwiftDocCTests/Semantics/StepTests.swift b/Tests/SwiftDocCTests/Semantics/StepTests.swift index 4d72b2f4a1..81d1b1f965 100644 --- a/Tests/SwiftDocCTests/Semantics/StepTests.swift +++ b/Tests/SwiftDocCTests/Semantics/StepTests.swift @@ -19,7 +19,7 @@ class StepTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let step = Step(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertEqual([ @@ -46,7 +46,7 @@ class StepTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let step = Step(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertTrue(problems.isEmpty) @@ -104,7 +104,7 @@ Step @1:1-9:2 """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let step = Step(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertEqual(2, problems.count) diff --git a/Tests/SwiftDocCTests/Semantics/SymbolTests.swift b/Tests/SwiftDocCTests/Semantics/SymbolTests.swift index 0eba5dbebe..d607e7936f 100644 --- a/Tests/SwiftDocCTests/Semantics/SymbolTests.swift +++ b/Tests/SwiftDocCTests/Semantics/SymbolTests.swift @@ -531,7 +531,7 @@ class SymbolTests: XCTestCase { withExtension: "symbols.json", subdirectory: "Test Resources" )! - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in try? FileManager.default.copyItem(at: deckKitSymbolGraph, to: url.appendingPathComponent("DeckKit.symbols.json")) } let symbol = try XCTUnwrap(context.documentationCache["c:objc(cs)PlayingCard(cm)newWithRank:ofSuit:"]?.semantic as? Symbol) @@ -549,7 +549,7 @@ class SymbolTests: XCTestCase { } func testUnresolvedReferenceWarningsInDocumentationExtension() throws { - let (url, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (url, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in let myKitDocumentationExtensionComment = """ # ``MyKit/MyClass`` @@ -959,7 +959,7 @@ class SymbolTests: XCTestCase { - """ - let (_, _, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, _, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in var graph = try JSONDecoder().decode(SymbolGraph.self, from: Data(contentsOf: url.appendingPathComponent("mykit-iOS.symbols.json"))) let myFunctionUSR = "s:5MyKit0A5ClassC10myFunctionyyF" @@ -1203,7 +1203,7 @@ class SymbolTests: XCTestCase { func makeDocumentationNodeSymbol(docComment: String, articleContent: String?, file: StaticString = #file, line: UInt = #line) throws -> (Symbol, [Problem]) { let myFunctionUSR = "s:5MyKit0A5ClassC10myFunctionyyF" - let (_, bundle, context) = try testBundleAndContext(copying: "DoNotUseInNewTests") { url in + let (_, bundle, context) = try testBundleAndContext(copying: "LegacyBundle_DoNotUseInNewTests") { url in var graph = try JSONDecoder().decode(SymbolGraph.self, from: Data(contentsOf: url.appendingPathComponent("mykit-iOS.symbols.json"))) let newDocComment = SymbolGraph.LineList(docComment.components(separatedBy: .newlines).enumerated().map { arg -> SymbolGraph.LineList.Line in diff --git a/Tests/SwiftDocCTests/Semantics/TechnologyTests.swift b/Tests/SwiftDocCTests/Semantics/TechnologyTests.swift index affa8cfd3e..6297b10e92 100644 --- a/Tests/SwiftDocCTests/Semantics/TechnologyTests.swift +++ b/Tests/SwiftDocCTests/Semantics/TechnologyTests.swift @@ -19,7 +19,7 @@ class TechnologyTests: XCTestCase { let source = "@Tutorials" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let technology = TutorialTableOfContents(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(technology) diff --git a/Tests/SwiftDocCTests/Semantics/TileTests.swift b/Tests/SwiftDocCTests/Semantics/TileTests.swift index d245ba95b8..af8424622d 100644 --- a/Tests/SwiftDocCTests/Semantics/TileTests.swift +++ b/Tests/SwiftDocCTests/Semantics/TileTests.swift @@ -26,7 +26,7 @@ class TileTests: XCTestCase { let source = "@\(directiveName)" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tile) @@ -49,7 +49,7 @@ class TileTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tile) @@ -75,7 +75,7 @@ class TileTests: XCTestCase { let source = "@\(directiveName)" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tile) @@ -97,7 +97,7 @@ class TileTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNotNil(tile) @@ -120,7 +120,7 @@ class TileTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) // Destination is set. @@ -136,7 +136,7 @@ class TileTests: XCTestCase { """ let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) // Destination is nil. @@ -149,7 +149,7 @@ class TileTests: XCTestCase { let source = "@UnknownTile" let document = Document(parsing: source, options: .parseBlockDirectives) let directive = document.child(at: 0)! as! BlockDirective - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") var problems = [Problem]() let tile = Tile(from: directive, source: nil, for: bundle, in: context, problems: &problems) XCTAssertNil(tile) diff --git a/Tests/SwiftDocCTests/Semantics/TutorialArticleTests.swift b/Tests/SwiftDocCTests/Semantics/TutorialArticleTests.swift index ac3bac82e1..f2939a3c96 100644 --- a/Tests/SwiftDocCTests/Semantics/TutorialArticleTests.swift +++ b/Tests/SwiftDocCTests/Semantics/TutorialArticleTests.swift @@ -19,7 +19,7 @@ class TutorialArticleTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -56,7 +56,7 @@ class TutorialArticleTests: XCTestCase { let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -106,7 +106,7 @@ TutorialArticle @1:1-13:2 let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -155,7 +155,7 @@ TutorialArticle @1:1-23:2 let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -265,7 +265,7 @@ TutorialArticle @1:1-23:2 title: 'Basic Augmented Reality App' time: '20' let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -361,7 +361,7 @@ TutorialArticle @1:1-81:2 let directive = document.child(at: 0) as? BlockDirective XCTAssertNotNil(directive) - let (bundle, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (bundle, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") directive.map { directive in var problems = [Problem]() @@ -398,7 +398,7 @@ TutorialArticle @1:1-42:2 title: 'Basic Augmented Reality App' time: '20' let reference = ResolvedTopicReference(bundleID: "org.swift.docc.TopicGraphTests", path: "/\(title)", sourceLanguage: .swift) let node = TopicGraph.Node(reference: reference, kind: .tutorialTableOfContents, source: .file(url: URL(fileURLWithPath: "/path/to/\(title)")), title: title) - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") context.topicGraph.addNode(node) let engine = DiagnosticEngine() @@ -417,7 +417,7 @@ TutorialArticle @1:1-42:2 title: 'Basic Augmented Reality App' time: '20' let reference = ResolvedTopicReference(bundleID: "org.swift.docc.TopicGraphTests", path: "/\(title)", sourceLanguage: .swift) let node = TopicGraph.Node(reference: reference, kind: .tutorialTableOfContents, source: .external, title: title) - let (_, context) = try testBundleAndContext(named: "DoNotUseInNewTests") + let (_, context) = try testBundleAndContext(named: "LegacyBundle_DoNotUseInNewTests") context.topicGraph.addNode(node) let engine = DiagnosticEngine() @@ -437,7 +437,7 @@ TutorialArticle @1:1-42:2 title: 'Basic Augmented Reality App' time: '20' let range = SourceLocation(line: 1, column: 1, source: url).. [Problem] { // This bundle has both non-analyze and analyze style warnings. let testBundleURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let bundle = try Folder.createFromDisk(url: testBundleURL) let testDataProvider = try TestFileSystem(folders: [bundle, Folder.emptyHTMLTemplateDirectory]) @@ -1749,7 +1749,7 @@ class ConvertActionTests: XCTestCase { /// and also with and without generating digest produces the same results func testConvertTestBundleWithHighConcurrency() async throws { let testBundleURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let bundle = try Folder.createFromDisk(url: testBundleURL) struct TestReferenceResolver: ExternalDocumentationSource { @@ -1839,7 +1839,7 @@ class ConvertActionTests: XCTestCase { let testBundleURL = try XCTUnwrap( Bundle.module.url( - forResource: "DoNotUseInNewTests", + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles" ) @@ -1915,7 +1915,7 @@ class ConvertActionTests: XCTestCase { func testConvertActionNavigatorIndexGeneration() async throws { // The navigator index needs to test with the real file manager - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let templateURL = try createTemporaryDirectory().appendingPathComponent("template") @@ -2825,7 +2825,7 @@ class ConvertActionTests: XCTestCase { } func testConvertWithoutBundleDerivesDisplayNameAndIdentifierFromSingleModuleSymbolGraph() async throws { - let myKitSymbolGraph = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let myKitSymbolGraph = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json") XCTAssert(FileManager.default.fileExists(atPath: myKitSymbolGraph.path)) @@ -2859,7 +2859,7 @@ class ConvertActionTests: XCTestCase { } func testConvertWithoutBundleErrorsForMultipleModulesSymbolGraph() async throws { - let testBundle = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let testBundle = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let myKitSymbolGraph = testBundle .appendingPathComponent("mykit-iOS.symbols.json") let sideKitSymbolGraph = testBundle diff --git a/Tests/SwiftDocCUtilitiesTests/IndexActionTests.swift b/Tests/SwiftDocCUtilitiesTests/IndexActionTests.swift index 9ca4205eee..982794eaea 100644 --- a/Tests/SwiftDocCUtilitiesTests/IndexActionTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/IndexActionTests.swift @@ -19,7 +19,7 @@ class IndexActionTests: XCTestCase { #if !os(iOS) func testIndexActionOutputIsDeterministic() async throws { // Convert a test bundle as input for the IndexAction - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let templateURL = try createTemporaryDirectory().appendingPathComponent("template") diff --git a/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift b/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift index c8eee0c501..82e991b994 100644 --- a/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift @@ -24,7 +24,7 @@ class PreviewActionIntegrationTests: XCTestCase { forResource: "image", withExtension: "png", subdirectory: "Test Resources")! let symbolURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! .appendingPathComponent("mykit-iOS.symbols.json") // Write source documentation bundle. diff --git a/Tests/SwiftDocCUtilitiesTests/StaticHostableTransformerTests.swift b/Tests/SwiftDocCUtilitiesTests/StaticHostableTransformerTests.swift index 3b69fea63a..d348e37791 100644 --- a/Tests/SwiftDocCUtilitiesTests/StaticHostableTransformerTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/StaticHostableTransformerTests.swift @@ -20,7 +20,7 @@ class StaticHostableTransformerTests: StaticHostingBaseTests { func testStaticHostableTransformerOutput() async throws { // Convert a test bundle as input for the StaticHostableTransformer - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let fileManager = FileManager.default @@ -123,7 +123,7 @@ class StaticHostableTransformerTests: StaticHostingBaseTests { func testStaticHostableTransformerIndexHTMLOutput() async throws { // Convert a test bundle as input for the StaticHostableTransformer - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let templateURL = try createTemporaryDirectory().appendingPathComponent("template") diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/Default Code Listing Syntax.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/Default Code Listing Syntax.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/Default Code Listing Syntax.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/Default Code Listing Syntax.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/FillIntroduced.symbols.json b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/FillIntroduced.symbols.json similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/FillIntroduced.symbols.json rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/FillIntroduced.symbols.json diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/Info.plist b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/Info.plist similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/Info.plist rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/Info.plist diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/MyKit@SideKit.symbols.json b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/MyKit@SideKit.symbols.json similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/MyKit@SideKit.symbols.json rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/MyKit@SideKit.symbols.json diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestOverview.tutorial b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestOverview.tutorial similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestOverview.tutorial rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestOverview.tutorial diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorial.tutorial b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorial.tutorial similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorial.tutorial rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorial.tutorial diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorial2.tutorial b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorial2.tutorial similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorial2.tutorial rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorial2.tutorial diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorialArticle.tutorial b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorialArticle.tutorial similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TestTutorialArticle.tutorial rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TestTutorialArticle.tutorial diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TutorialMediaWithSpaces.tutorial b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TutorialMediaWithSpaces.tutorial similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/TutorialMediaWithSpaces.tutorial rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/TutorialMediaWithSpaces.tutorial diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article2.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article2.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article2.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article2.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article3.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article3.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/article3.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/article3.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/myclass.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/myclass.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/myclass.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/myclass.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/mykit.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/mykit.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/mykit.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/mykit.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/myprotocol.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/myprotocol.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/myprotocol.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/myprotocol.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/sideclass-init.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/sideclass-init.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/sideclass-init.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/sideclass-init.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/sidekit.md b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/sidekit.md similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/documentation/sidekit.md rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/documentation/sidekit.md diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/figure1.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/figure1.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/figure1.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/figure1.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/figure1~dark.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/figure1~dark.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/figure1~dark.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/figure1~dark.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld.swift b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld.swift similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld.swift rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld.swift diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld1.swift b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld1.swift similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld1.swift rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld1.swift diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld2.swift b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld2.swift similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld2.swift rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld2.swift diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld3.swift b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld3.swift similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld3.swift rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld3.swift diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld4.swift b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld4.swift similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/helloworld4.swift rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/helloworld4.swift diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/intro.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/intro.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/intro.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/intro.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introposter.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introposter.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introposter.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introposter.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introposter2.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introposter2.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introposter2.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introposter2.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introvideo.mp4 b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introvideo.mp4 similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introvideo.mp4 rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introvideo.mp4 diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introvideo~dark.mp4 b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introvideo~dark.mp4 similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/introvideo~dark.mp4 rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/introvideo~dark.mp4 diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/mykit-iOS.symbols.json b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/mykit-iOS.symbols.json similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/mykit-iOS.symbols.json rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/mykit-iOS.symbols.json diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/project.zip b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/project.zip similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/project.zip rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/project.zip diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/sidekit.symbols.json b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/sidekit.symbols.json similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/sidekit.symbols.json rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/sidekit.symbols.json diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/something@2x.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/something@2x.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/something@2x.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/something@2x.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/step.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/step.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/step.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/step.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/titled2up.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/titled2up.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/titled2up.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/titled2up.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/titled2upCapital.PNG b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/titled2upCapital.PNG similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/titled2upCapital.PNG rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/titled2upCapital.PNG diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces.mp4 b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces.mp4 similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces.mp4 rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces.mp4 diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces.png diff --git a/Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces@2x.png b/Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces@2x.png similarity index 100% rename from Tests/SwiftDocCUtilitiesTests/Test Bundles/DoNotUseInNewTests.docc/with spaces@2x.png rename to Tests/SwiftDocCUtilitiesTests/Test Bundles/LegacyBundle_DoNotUseInNewTests.docc/with spaces@2x.png diff --git a/Tests/SwiftDocCUtilitiesTests/TransformForStaticHostingActionTests.swift b/Tests/SwiftDocCUtilitiesTests/TransformForStaticHostingActionTests.swift index 73e748f708..912e5824a7 100644 --- a/Tests/SwiftDocCUtilitiesTests/TransformForStaticHostingActionTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/TransformForStaticHostingActionTests.swift @@ -20,7 +20,7 @@ class TransformForStaticHostingActionTests: StaticHostingBaseTests { func testTransformForStaticHostingTestExternalOutput() async throws { // Convert a test bundle as input for the TransformForStaticHostingAction - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let templateURL = try createTemporaryDirectory().appendingPathComponent("template") @@ -100,7 +100,7 @@ class TransformForStaticHostingActionTests: StaticHostingBaseTests { func testTransformForStaticHostingActionTestInPlaceOutput() async throws { // Convert a test bundle as input for the TransformForStaticHostingAction - let bundleURL = Bundle.module.url(forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + let bundleURL = Bundle.module.url(forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! let targetURL = try createTemporaryDirectory() let fileManager = FileManager.default diff --git a/Tests/SwiftDocCUtilitiesTests/Utility/FileTests.swift b/Tests/SwiftDocCUtilitiesTests/Utility/FileTests.swift index 27bc67ce2b..c8f3f2ead0 100644 --- a/Tests/SwiftDocCUtilitiesTests/Utility/FileTests.swift +++ b/Tests/SwiftDocCUtilitiesTests/Utility/FileTests.swift @@ -23,7 +23,7 @@ class FileTests: XCTestCase { func testCreateFromDisk() throws { let testBundleURL = Bundle.module.url( - forResource: "DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! + forResource: "LegacyBundle_DoNotUseInNewTests", withExtension: "docc", subdirectory: "Test Bundles")! // Generates a list of all paths recursively inside a folder func pathsIn(folder: Folder, url: URL) -> [String] {