testing command line utilities
问题 I'm looking for a way to run tests on command-line utilities written in bash, or any other language. I'd like to find a testing framework that would have statements like setup: command = 'do_awesome_thing' filename = 'testfile' args = ['--with', 'extra_win', '--file', filename] run_command command args test_output_was_correct assert_output_was 'Creating awesome file "' + filename + '" with extra win.' test_file_contains_extra_win assert_file_contains filename 'extra win' Presumably the base