Skip to content

Commit

Permalink
🧪
Browse files Browse the repository at this point in the history
  • Loading branch information
aslilac committed May 12, 2024
1 parent bbc5b52 commit 26c9e3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/reporters/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl TerminalReporter {
let total_lines = summaries.iter().map(|(_, summary)| summary.lines).sum();

if total_lines == 0 {
println!(" no code found in {}", dir_path.display());
eprintln!(" no code found in {}", dir_path.display());
return Ok(());
}

Expand Down
11 changes: 4 additions & 7 deletions tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn scan_empty() {
.arg("tests/testdata/empty/")
.output()
.unwrap();
assert!(!result.status.success());
assert!(result.status.success());
let stderr = String::from_utf8_lossy(&result.stderr);

assert!(stderr.contains("no code found in"));
Expand Down Expand Up @@ -222,12 +222,9 @@ fn scan_hidden() {
.arg("tests/testdata/hidden")
.output()
.unwrap();
assert!(!result.status.success());
let stdout = String::from_utf8_lossy(&result.stderr);
let mut lines = stdout.lines();

let line = lines.next().unwrap();
assert!(line.contains("no code found"));
assert!(result.status.success());
let stderr = String::from_utf8_lossy(&result.stderr);
assert!(stderr.contains("no code found"));

// Scan *with* hidden files included should report the hidden files
let result = Command::new(EXE)
Expand Down

0 comments on commit 26c9e3d

Please sign in to comment.