Initial setup for integration tests.

This commit is contained in:
2021-02-13 01:11:31 +03:00
parent c6583871b4
commit e2257e1458
6 changed files with 157 additions and 5 deletions
+4 -2
View File
@@ -68,7 +68,9 @@ impl Shredder {
match File::create(absolute_path) {
Ok(file) => {
println!("File's size: {}", file_length);
if options.verbosity > Verbosity::Low {
println!("File's size: {}", file_length);
}
let mut buffer = BufWriter::new(&file);
for _ in 0..options.rewrite_iterations {
@@ -215,7 +217,7 @@ impl PartialEq for Verbosity {
#[cfg(test)]
mod tests {
use crate::shred::Verbosity;
use crate::Verbosity;
#[test]
fn verbosity_check() {
+1 -3
View File
@@ -2,11 +2,9 @@ extern crate clap;
use clap::{App, Arg, crate_authors, crate_name, crate_version};
use crate::shred::{Shredder, Verbosity, ShredOptions};
use std::process::exit;
use std::str::FromStr;
mod shred;
use rshred::{Verbosity, Shredder, ShredOptions};
fn main() {
let params = App::new(crate_name!())