Add som units tests (split some code to made some part testable)
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
t.schmitt committed 2022-09-06 15:35:15 +02:00
1 parent b4ced6911c
commit 69ba5a53bf
26 files changed
+1738 -156

No files matched your search

@@ -0,0 +1,19 @@
//
// StringExtensions.swift
//
//
// Created by Thibaut Schmitt on 05/09/2022.
//
import Foundation
extension String {
/// Remove all new lines and leading/trailing whitespaces
func adaptForXCTest() -> Self {
self
.split(separator: "\n")
.compactMap { String($0).removeLeadingTrailingWhitespace() }
.joined(separator: " - ")
}
}