1pub mod cli_util;
2pub mod home_dir;
3pub mod io_util;
4pub mod menu_builder;
5pub mod parser;
6pub mod time;
7
8#[cfg(test)]
9mod test {
10 use crate::cli_util;
11
12 #[test]
13 fn parse_arg_test() {
14 let parse_arg = super::parser::parse_args(
15 vec!["todo", "add", "-c", "true", "--lol", "-none"]
16 .into_iter()
17 .map(String::from)
18 .collect(),
19 );
20 dbg!(parse_arg);
21 }
22
23 #[test]
24 fn input_test() {
25 let input = super::io_util::input("Type in your name: ");
26 dbg!(input);
27
28 let input_other: i32 = super::io_util::input_other("Type in your age: ");
29 dbg!(input_other);
30
31 let input_other_repeat: i32 =
32 super::io_util::input_other_repeat("Input the year you were born: ");
33 dbg!(input_other_repeat);
34 }
35
36 #[test]
37 fn cli_util_test() {
38 const NUM: i32 = 1_000_000;
39
40 for i in 0..NUM {
41 cli_util::draw_progress_bar_message(
42 ((i + 1) as f64) / (NUM as f64),
43 100,
44 "looping... ",
45 );
46 }
47 }
48}