mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
28 lines
636 B
Swift
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)
|
|
}
|
|
}
|