Skip to content

Commit

Permalink
chore: improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkal committed Aug 5, 2020
1 parent 65a1bfc commit aa1bf03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/executor.rs
Expand Up @@ -60,7 +60,7 @@ fn run_bat(source: String, lang: &str) -> io::Result<process::Child> {
child_stdin.write_all(source.as_bytes())?;
io::Result::Ok(child)
}
Err(err) => io::Result::Err(err),
Err(err) => io::Result::Err(err), // cov:include
}
}

Expand Down Expand Up @@ -94,8 +94,8 @@ pub fn execute_command(
match run_bat(source.clone(), &cmd.script.executor) {
Ok(mut child) => Some(child.wait()),
Err(_) => {
print!("{}", source);
None
print!("{}", source); // cov:include (bat exists)
None // cov:include
}
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/loader.rs
Expand Up @@ -9,7 +9,7 @@ pub fn read_stdin() -> Result<String, String> {
let mut buffer = String::new();
let r = io::stdin().read_to_string(&mut buffer);
if r.is_err() {
Err("failed to read stdin".to_string())
Err("failed to read stdin".to_string()) // cov:ignore (unusual)
} else {
Ok(buffer)
}
Expand Down

0 comments on commit aa1bf03

Please sign in to comment.