From 5872a823d05fd0f77fc42b0fe497bc1c4ffe4da0 Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Thu, 2 Feb 2023 19:55:54 +0100 Subject: [PATCH] test: add time test --- src/builtins/time.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/builtins/time.rs b/src/builtins/time.rs index 0e79262..a831e99 100644 --- a/src/builtins/time.rs +++ b/src/builtins/time.rs @@ -24,3 +24,13 @@ fn format_time(time: DateTime, formatting: &str) -> String { _ => time.format("%T").to_string(), } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_time() { + assert_eq!(Time.execute(&mut BuiltinConfig::new(), vec![]), Ok(())) + } +}