Skip to content

Commit

Permalink
other test
Browse files Browse the repository at this point in the history
  • Loading branch information
helio-frota committed Jun 11, 2024
1 parent c6daaa1 commit 4c54fe1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# dpc
# dpc

[![ci](https://github.com/helio-frota/dpc/actions/workflows/ci.yaml/badge.svg)](https://github.com/helio-frota/dpc/actions/workflows/ci.yaml)

> 'dpc' is a shorter name for 'duplicrabs' (which is a made-up word).
Basic and not 100% accurate for finding duplicate code blocks in Rust projects.

8 changes: 8 additions & 0 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ mod tests {
let files = util::rust_files(".").expect("rust files not found.");
assert_eq!(3, files.len());
}

#[test]
fn test_get_content() {
let files = util::rust_files(".").expect("rust files not found.");
let path_as_str = files[0].to_string_lossy();
let content = util::content(&path_as_str);
assert!(content.unwrap().contains("use"));
}
}

0 comments on commit 4c54fe1

Please sign in to comment.