feat(RES-34): Fix plist font filename (#14)
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good
Reviewed-on: #14
This commit is contained in:
@ -16,8 +16,8 @@ final class FontExtensionGeneratorTests: XCTestCase {
|
||||
func test_uiKit_GeneratedExtensionContent() {
|
||||
// Given
|
||||
let fontNames: [FontName] = [
|
||||
"CircularStd-Regular",
|
||||
"CircularStd-Bold"
|
||||
FontName(postscriptName: "CircularStd-Regular", filename: "CircularStd-Regular", fileExtension: "ttf"),
|
||||
FontName(postscriptName: "CircularStd-Bold", filename: "CircularStd-Bold", fileExtension: "ttf")
|
||||
]
|
||||
|
||||
// When
|
||||
@ -59,8 +59,8 @@ final class FontExtensionGeneratorTests: XCTestCase {
|
||||
func test_swiftUI_GeneratedExtensionContent() {
|
||||
// Given
|
||||
let fontNames: [FontName] = [
|
||||
"CircularStd-Regular",
|
||||
"CircularStd-Bold"
|
||||
FontName(postscriptName: "CircularStd-Regular", filename: "CircularStd-Regular", fileExtension: "ttf"),
|
||||
FontName(postscriptName: "CircularStd-Bold", filename: "CircularStd-Bold", fileExtension: "ttf")
|
||||
]
|
||||
|
||||
// When
|
||||
|
@ -14,8 +14,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_uiKit_GeneratedProperty_noForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "CircularStdBold"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "CircularStdBold",
|
||||
filename: "CircularStd-Bold",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: true, isSwiftUI: false)
|
||||
|
||||
@ -31,7 +35,11 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_uiKit_GeneratedProperty_withForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "[Circular_Std+Bold-Underline]"
|
||||
let fontName = FontName(
|
||||
postscriptName: "[Circular_Std+Bold-Underline]",
|
||||
filename: "Circular_Std+Bold-Underline",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: true, isSwiftUI: false)
|
||||
@ -48,8 +56,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_uiKit_GeneratedMethod_noForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "CircularStdBold"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "CircularStdBold",
|
||||
filename: "CircularStd-Bold",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: false, isSwiftUI: false)
|
||||
|
||||
@ -65,8 +77,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_uiKit_GeneratedMethod_withForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "[Circular_Std+Bold-Underline]"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "[Circular_Std+Bold-Underline]",
|
||||
filename: "Circular_Std+Bold-Underline",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: false, isSwiftUI: false)
|
||||
|
||||
@ -82,8 +98,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_swiftUI_GeneratedProperty_noForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "CircularStdBold"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "CircularStdBold",
|
||||
filename: "CircularStd-Bold",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: true, isSwiftUI: true)
|
||||
|
||||
@ -99,8 +119,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_swiftUI_GeneratedProperty_withForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "[Circular_Std+Bold-Underline]"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "[Circular_Std+Bold-Underline]",
|
||||
filename: "Circular_Std+Bold-Underline",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: true, isSwiftUI: true)
|
||||
|
||||
@ -116,8 +140,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_swiftUI_GeneratedMethod_noForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "CircularStdBold"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "CircularStdBold",
|
||||
filename: "CircularStd-Bold",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: false, isSwiftUI: true)
|
||||
|
||||
@ -133,8 +161,12 @@ final class FontNameTests: XCTestCase {
|
||||
|
||||
func test_swiftUI_GeneratedMethod_withForbiddenCharacter() {
|
||||
// Given
|
||||
let fontName: FontName = "[Circular_Std+Bold-Underline]"
|
||||
|
||||
let fontName = FontName(
|
||||
postscriptName: "[Circular_Std+Bold-Underline]",
|
||||
filename: "Circular_Std+Bold-Underline",
|
||||
fileExtension: "ttf"
|
||||
)
|
||||
|
||||
// When
|
||||
let property = fontName.getProperty(isStatic: false, isSwiftUI: true)
|
||||
|
||||
|
@ -14,8 +14,8 @@ final class FontPlistGeneratorTests: XCTestCase {
|
||||
func testGeneratedPlist() {
|
||||
// Given
|
||||
let fontNames: [FontName] = [
|
||||
"CircularStd-Regular",
|
||||
"CircularStd-Bold"
|
||||
FontName(postscriptName: "CircularStd-Regular", filename: "CircularStd-Regular", fileExtension: "ttf"),
|
||||
FontName(postscriptName: "CircularStd-Bold", filename: "CircularStd-Bold", fileExtension: "ttf")
|
||||
]
|
||||
|
||||
// When
|
||||
@ -25,8 +25,8 @@ final class FontPlistGeneratorTests: XCTestCase {
|
||||
let expect = """
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>CircularStd-Regular</string>
|
||||
<string>CircularStd-Bold</string>
|
||||
<string>CircularStd-Regular.ttf</string>
|
||||
<string>CircularStd-Bold.ttf</string>
|
||||
</array>
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user