smn_rust_util 0.1.0

A collection of utility functions for Rust
Documentation
#[allow(unused)]
pub mod logging;
#[allow(unused)]
pub mod file;

#[cfg(test)]
mod tests {
    use crate::{file, logging::{log_line, log_line_header, logln, logln_color, Color}};


    #[test]
    fn test_logln() {
        // Testing logln (This will print to the console)
        logln("This is a test log line.");
    }

    #[test]
    fn test_logln_color() {
        // Testing logln_color (This will print colored output to the console)
        logln_color("This is a test log line in color.", Color::Red);
    }

    #[test]
    fn test_log_line() {
        // Testing log_line
        log_line(30, Color::Blue);
    }

    #[test]
    fn test_log_line_header() {
        // Testing log_line_header with centered text
        log_line_header("Header", 30, Color::Green);
    }

    #[test]
    fn test_get_path_root() {
        // Testing get_path_root
        let path = file::get_path_root();
        println!("Path root: {}", path);
    }
}