diff --git a/Sources/Routing/Branch.swift b/Sources/Routing/Branch.swift index 05460f15..b1692311 100644 --- a/Sources/Routing/Branch.swift +++ b/Sources/Routing/Branch.swift @@ -218,6 +218,12 @@ public class Branch { // TODO: Rename Context let link = key.characters.first == ":" ? ":" : key let next = subBranches[link] ?? type(of: self).init(name: key, output: nil) + if next.name != key { + var warning = "[WARNING] Mismatched Slugs:\n" + warning += "Attempted to overwrite \(next.name) with \(key)\n" + warning += "Please use the same slug name for all routes on shared branch" + print(warning) + } next.parent = self // trigger lazy loads at extension time -- seek out cleaner way to do this _ = next.path diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 06726d08..ea5a71ab 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,60 +1,10 @@ #if os(Linux) import XCTest -@testable import CacheTests -@testable import SessionsTests -@testable import SettingsTests -@testable import CookiesTests -@testable import VaporTests @testable import RoutingTests @testable import HTTPRoutingTests XCTMain([ - // Cache - testCase(FluentCacheTests.allTests), - testCase(MemoryCacheTests.allTests), - - // Config - testCase(ConfigTests.allTests), - testCase(MergeTests.allTests), - testCase(EnvTests.allTests), - testCase(CLIConfigTests.allTests), - - // Cookies - testCase(CookiesTests.allTests), - testCase(CookieTests.allTests), - testCase(HTTPTests.allTests), - testCase(ParsingTests.allTests), - testCase(SerializingTests.allTests), - - // Sessions - testCase(SessionsProtocolTests.allTests), - testCase(SessionTests.allTests), - - // Vapor - testCase(ConfigIntegrationTests.allTests), - testCase(ConsoleTests.allTests), - testCase(ContentTests.allTests), - testCase(CookieTests.allTests), - testCase(DataSplitTests.allTests), - testCase(DropletTests.allTests), - testCase(EnvironmentTests.allTests), - testCase(EventTests.allTests), - testCase(FileManagerTests.allTests), - testCase(HashTests.allTests), - testCase(LocalizationTests.allTests), - testCase(LogTests.allTests), - testCase(MiddlewareTests.allTests), - testCase(ProcessTests.allTests), - testCase(ProviderTests.allTests), - testCase(ResourceTests.allTests), - testCase(RoutingTests.allTests), - testCase(SessionsTests.allTests), - testCase(ValidationConvenienceTests.allTests), - testCase(ValidationCountTests.allTests), - testCase(ValidationTests.allTests), - testCase(ValidationUniqueTests.allTests), - // Routing testCase(BranchTests.allTests), testCase(RouteBuilderTests.allTests),