From b994e92201cfa2aec5cc6e725922a37dd3051801 Mon Sep 17 00:00:00 2001 From: Thibaut Schmitt Date: Thu, 17 Jul 2025 14:19:07 +0200 Subject: [PATCH] Fix des on optional extension generation --- .../Generate/ColorsConfigurationTests.swift | 8 +++----- .../Generate/FontsConfigurationTests.swift | 8 +++----- .../Generate/ImagesConfigurationTests.swift | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Tests/ResgenSwiftTests/Generate/ColorsConfigurationTests.swift b/Tests/ResgenSwiftTests/Generate/ColorsConfigurationTests.swift index ea905f4..5bb6384 100644 --- a/Tests/ResgenSwiftTests/Generate/ColorsConfigurationTests.swift +++ b/Tests/ResgenSwiftTests/Generate/ColorsConfigurationTests.swift @@ -19,7 +19,7 @@ final class ColorsConfigurationTests: XCTestCase { let testingConfiguration = ColorsConfiguration(inputFile: "path/to/colors.txt", style: ColorStyle.all.rawValue, xcassetsPath: "path/to/assets.xcassets", - extensionOutputPath: "Colors/Generated", + extensionOutputPath: nil, extensionName: nil, extensionNameUIKit: nil, extensionSuffix: nil, @@ -34,8 +34,6 @@ final class ColorsConfigurationTests: XCTestCase { "all", "--xcassets-path", "projectDirectory/path/to/assets.xcassets", - "--extension-output-path", - "projectDirectory/Colors/Generated", "--static-members", "false" ] @@ -64,10 +62,10 @@ final class ColorsConfigurationTests: XCTestCase { "all", "--xcassets-path", "projectDirectory/path/to/assets.xcassets", - "--extension-output-path", - "projectDirectory/Colors/Generated", "--static-members", "false", + "--extension-output-path", + "projectDirectory/Colors/Generated", "--extension-name", "AppUIColor", "--extension-name-ui-kit", diff --git a/Tests/ResgenSwiftTests/Generate/FontsConfigurationTests.swift b/Tests/ResgenSwiftTests/Generate/FontsConfigurationTests.swift index 785b49c..5ca0249 100644 --- a/Tests/ResgenSwiftTests/Generate/FontsConfigurationTests.swift +++ b/Tests/ResgenSwiftTests/Generate/FontsConfigurationTests.swift @@ -17,7 +17,7 @@ final class FontsConfigurationTests: XCTestCase { func test_argsGeneration_requiredArgs() { // Given let testingConfiguration = FontsConfiguration(inputFile: "path/to/fonts.txt", - extensionOutputPath: "Fonts/Generated", + extensionOutputPath: nil, extensionName: nil, extensionNameUIKit: nil, extensionSuffix: nil, @@ -29,8 +29,6 @@ final class FontsConfigurationTests: XCTestCase { // Expect let expectedArguments = [ "projectDirectory/path/to/fonts.txt", - "--extension-output-path", - "projectDirectory/Fonts/Generated", "--static-members", "false" ] @@ -54,10 +52,10 @@ final class FontsConfigurationTests: XCTestCase { let expectedArguments = [ "-f", "projectDirectory/path/to/fonts.txt", - "--extension-output-path", - "projectDirectory/Fonts/Generated", "--static-members", "true", + "--extension-output-path", + "projectDirectory/Fonts/Generated", "--extension-name", "AppUIFont", "--extension-name-ui-kit", diff --git a/Tests/ResgenSwiftTests/Generate/ImagesConfigurationTests.swift b/Tests/ResgenSwiftTests/Generate/ImagesConfigurationTests.swift index 7e4f8ff..476ca39 100644 --- a/Tests/ResgenSwiftTests/Generate/ImagesConfigurationTests.swift +++ b/Tests/ResgenSwiftTests/Generate/ImagesConfigurationTests.swift @@ -18,7 +18,7 @@ final class ImagesConfigurationTests: XCTestCase { // Given let testingConfiguration = ImagesConfiguration(inputFile: "path/to/images.txt", xcassetsPath: "path/to/assets.xcassets", - extensionOutputPath: "Images/Generated", + extensionOutputPath: nil, extensionName: nil, extensionNameUIKit: nil, extensionSuffix: nil, @@ -32,8 +32,6 @@ final class ImagesConfigurationTests: XCTestCase { "projectDirectory/path/to/images.txt", "--xcassets-path", "projectDirectory/path/to/assets.xcassets", - "--extension-output-path", - "projectDirectory/Images/Generated", "--static-members", "false" ] @@ -60,10 +58,10 @@ final class ImagesConfigurationTests: XCTestCase { "projectDirectory/path/to/images.txt", "--xcassets-path", "projectDirectory/path/to/assets.xcassets", - "--extension-output-path", - "projectDirectory/Images/Generated", "--static-members", "true", + "--extension-output-path", + "projectDirectory/Images/Generated", "--extension-name", "AppUIImage", "--extension-name-ui-kit",