Files
SwiftFormat/Tests/Rules/HeaderFileNameTests.swift
T
2025-10-04 08:46:46 +01:00

28 lines
636 B
Swift

//
// HeaderFileNameTests.swift
// SwiftFormatTests
//
// Created by Nick Lockwood on 5/3/23.
// Copyright © 2024 Nick Lockwood. All rights reserved.
//
import XCTest
@testable import SwiftFormat
final class HeaderFileNameTests: XCTestCase {
func testHeaderFileNameReplaced() {
let input = """
// MyFile.swift
let foo = bar
"""
let output = """
// YourFile.swift
let foo = bar
"""
let options = FormatOptions(fileInfo: FileInfo(filePath: "~/YourFile.swift"))
testFormatting(for: input, output, rule: .headerFileName, options: options)
}
}