I've just started building a little CLI tool in Xcode on macOS, but I'm trying to make it as platform-agnostic as possible. To that end I found the nice ArgumentParser package.
But I'm finding it would be nice to be able to run automated
XCTestCase cases against the argument parsing, to make sure I’ve specified it correctly. How might I go about doing this?
It's a bit odd, since Xcode didn't create any unit tests when I instantiated the macOS CLI template, and even after adding a couple of Swift Package Dependencies, it the project doesn't have a Package.swift file. I suppose to be properly cross platform I should add one, but I don't want to fight Xcode right now and I'm worried about rocking its little boat.
What's the best way to unit test the parsing? Thanks!