diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 14ee5fb05..811e5c5ee 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -205,7 +205,8 @@ extension IdentifierNameRuleTests { ("testIdentifierName", testIdentifierName), ("testIdentifierNameWithAllowedSymbols", testIdentifierNameWithAllowedSymbols), ("testIdentifierNameWithAllowedSymbolsAndViolation", testIdentifierNameWithAllowedSymbolsAndViolation), - ("testIdentifierNameWithIgnoreStartWithLowercase", testIdentifierNameWithIgnoreStartWithLowercase) + ("testIdentifierNameWithIgnoreStartWithLowercase", testIdentifierNameWithIgnoreStartWithLowercase), + ("testLinuxCrashOnEmojiNames", testLinuxCrashOnEmojiNames) ] } diff --git a/Tests/SwiftLintFrameworkTests/IdentifierNameRuleTests.swift b/Tests/SwiftLintFrameworkTests/IdentifierNameRuleTests.swift index a2d0a590a..8d5b4965b 100644 --- a/Tests/SwiftLintFrameworkTests/IdentifierNameRuleTests.swift +++ b/Tests/SwiftLintFrameworkTests/IdentifierNameRuleTests.swift @@ -53,4 +53,14 @@ class IdentifierNameRuleTests: XCTestCase { verifyRule(description, ruleConfiguration: ["validates_start_with_lowercase": false]) } + + func testLinuxCrashOnEmojiNames() { + let baseDescription = IdentifierNameRule.description + let triggeringExamples = [ + "let 👦🏼 = \"👦🏼\"" + ] + + let description = baseDescription.with(triggeringExamples: triggeringExamples) + verifyRule(description, ruleConfiguration: ["allowed_symbols": ["$", "%"]]) + } }