|
| 1 | +// Successful match FSPaths |
| 2 | +private let fsPathSuccess = #""" |
| 3 | +./First/Second/Third/some/really/long/content.extension/more/stuff/OptionLeft |
| 4 | +./First/Second/Third/some/really/long/content.extension/more/stuff/OptionRight |
| 5 | +./First/Second/PrefixThird/some/really/long/content.extension/more/stuff/OptionLeft |
| 6 | +./First/Second/PrefixThird/some/really/long/content.extension/more/stuff/OptionRight |
| 7 | +"""# |
| 8 | + |
| 9 | +// Unsucessful match FSPaths. |
| 10 | +// |
| 11 | +// We will have far more failures than successful matches by interspersing |
| 12 | +// this whole list between each success |
| 13 | +private let fsPathFailure = #""" |
| 14 | +a/b/c |
| 15 | +/smol/path |
| 16 | +/a/really/long/path/that/is/certainly/stored/out/of/line |
| 17 | +./First/Second/Third/some/really/long/content.extension/more/stuff/NothingToSeeHere |
| 18 | +./First/Second/PrefixThird/some/really/long/content.extension/more/stuff/NothingToSeeHere |
| 19 | +./First/Second/Third/some/really/long/content.extension/more/stuff/OptionNeither |
| 20 | +./First/Second/PrefixThird/some/really/long/content.extension/more/stuff/OptionNeither |
| 21 | +/First/Second/Third/some/really/long/content.extension/more/stuff/OptionLeft |
| 22 | +/First/Second/Third/some/really/long/content.extension/more/stuff/OptionRight |
| 23 | +/First/Second/PrefixThird/some/really/long/content.extension/more/stuff/OptionLeft |
| 24 | +/First/Second/PrefixThird/some/really/long/content.extension/more/stuff/OptionRight |
| 25 | +./First/Second/Third/some/really/long/content/more/stuff/OptionLeft |
| 26 | +./First/Second/Third/some/really/long/content/more/stuff/OptionRight |
| 27 | +./First/Second/PrefixThird/some/really/long/content/more/stuff/OptionLeft |
| 28 | +./First/Second/PrefixThird/some/really/long/content/more/stuff/OptionRight |
| 29 | +"""# |
| 30 | + |
| 31 | +extension Inputs { |
| 32 | + static let fsPathsList: [String] = { |
| 33 | + var result: [String] = [] |
| 34 | + let failures: [String] = fsPathFailure.split(whereSeparator: { $0.isNewline }).map { String($0) } |
| 35 | + result.append(contentsOf: failures) |
| 36 | + |
| 37 | + for success in fsPathSuccess.split(whereSeparator: { $0.isNewline }) { |
| 38 | + result.append(String(success)) |
| 39 | + result.append(contentsOf: failures) |
| 40 | + } |
| 41 | + |
| 42 | + // Scale result up a bit |
| 43 | + result.append(contentsOf: result) |
| 44 | + result.append(contentsOf: result) |
| 45 | + result.append(contentsOf: result) |
| 46 | + result.append(contentsOf: result) |
| 47 | + |
| 48 | + return result |
| 49 | + |
| 50 | + }() |
| 51 | +} |
0 commit comments