Open natefinch opened 7 years ago
If flags parsing is handled by cobra, I thought the testing was supposed to be done there! I haven't used cobra that much, but looking at the cli/commands.go
there is nothing much to test, unless if i missed something.
It's not parsing the command line so much as ensuring that the flags behave properly, etc. Like, there was a time when I broke the verbose output.
Oh! That is sad, I take these things for granted when using commandline app building libs!I'm a big fan of urfave/cli
. It is tricky to test though, can't remember the trick used by os/exec
as it might require running the binary to test it.
Tests to ensure the CLI flag parsing does all the right stuff