[tests] Refine the test naming and error messages
- Make the naming of test cases less ambiguous, e.g., rename "missing_input_file" to "missing_input_arg" or "input_file_not_found" - Unify the error messages on input/output options
This commit is contained in:
@@ -40,16 +40,16 @@ fn accepts_help() -> Result<()> {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn missing_metadata() -> Result<()> {
|
||||
fn missing_input_arg() -> Result<()> {
|
||||
let stderr = run_fail(cache_check!())?;
|
||||
assert!(stderr.contains(msg::MISSING_INPUT_ARG));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_such_metadata() -> Result<()> {
|
||||
fn input_file_not_found() -> Result<()> {
|
||||
let stderr = run_fail(cache_check!("/arbitrary/filename"))?;
|
||||
assert!(stderr.contains("No such file or directory"));
|
||||
assert!(stderr.contains(msg::FILE_NOT_FOUND));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user