1
0
Fork 0
mirror of https://github.com/archtechx/todo-system.git synced 2025-12-12 00:54:03 +00:00

move tests to a separate module

This commit is contained in:
Samuel Štancl 2023-11-25 20:48:32 +01:00
parent ffd29a34ec
commit 7bb891503f

View file

@ -369,8 +369,12 @@ pub fn scan_readme_file(path: &Path, entries: &mut Vec<Entry>) -> io::Result<()>
Ok(())
}
#[test]
fn generic_test() {
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn generic_test() {
let str = r#"
1
2
@ -446,10 +450,10 @@ fn generic_test() {
line: 11,
}
}, entries[5]);
}
}
#[test]
fn category_test() {
#[test]
fn category_test() {
let str = r#"
1
2
@ -534,10 +538,10 @@ fn category_test() {
line: 12,
}
}, entries[6]);
}
}
#[test]
fn priority_test() {
#[test]
fn priority_test() {
let str = r#"
1
2
@ -652,10 +656,10 @@ fn priority_test() {
line: 15,
}
}, entries[9]);
}
}
#[test]
fn sample_test_ts() {
#[test]
fn sample_test_ts() {
let mut entries: Vec<Entry> = vec![];
let mut path = std::env::current_dir().unwrap();
@ -755,10 +759,10 @@ fn sample_test_ts() {
line: 34,
}
}, entries[9]);
}
}
#[test]
fn todo_file_test() {
#[test]
fn todo_file_test() {
let mut entries: Vec<Entry> = vec![];
let mut path = std::env::current_dir().unwrap();
@ -840,10 +844,10 @@ fn todo_file_test() {
line: 12,
}
}, entries[7]);
}
}
#[test]
fn readme_file_test() {
#[test]
fn readme_file_test() {
let mut entries: Vec<Entry> = vec![];
let mut path = std::env::current_dir().unwrap();
@ -889,4 +893,5 @@ fn readme_file_test() {
line: 22,
}
}, entries[3]);
}
}