Add CLI arg parser tests

These tests address bug reports #8102 and #8279.