util.t: Add tests of command_detect.