From ac23fedf24b777a8f01d85313c39fb66c293bde2 Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Wed, 3 Sep 2025 01:18:04 +0200 Subject: [PATCH] Provoke testbench fail to ensure the CI notices errors --- src/tcl.rs | 8 ++++++++ src/tests.rs | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/tcl.rs b/src/tcl.rs index 71d97fe..79a4eda 100644 --- a/src/tcl.rs +++ b/src/tcl.rs @@ -32,3 +32,11 @@ pub fn commands(tcl: &str) -> Vec { return commands; } + +// @name words +// @return Vec +// @brief Split command into words. +// @param command: &str +pub fn words(command: &str) -> Vec { + vec![] +} diff --git a/src/tests.rs b/src/tests.rs index abf0a8f..f81f7e2 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,5 +1,5 @@ #[cfg(test)] -use crate::tcl::commands; +use crate::tcl::{commands, words}; #[test] fn test_commands_working() { @@ -38,3 +38,17 @@ fn test_commands_quotes() { assert_eq!(case_2, verify_2); assert_eq!(case_3, verify_3); } + +#[test] +fn test_words_simple() { + let testcase: &str = "routine argument 1234 0x123 abcd"; + let verify: Vec = vec![ + String::from("routine"), + String::from("argument"), + String::from("1234"), + String::from("0x123"), + String::from("abcd"), + ]; + let case: Vec = words(testcase); + assert_eq!(case, verify); +}