Provoke testbench fail to ensure the CI notices errors
Some checks failed
Run the tests for a working verification of xtcl. / build (ubuntu-20.04) (push) Failing after 50s
Some checks failed
Run the tests for a working verification of xtcl. / build (ubuntu-20.04) (push) Failing after 50s
This commit is contained in:
16
src/tests.rs
16
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<String> = vec![
|
||||
String::from("routine"),
|
||||
String::from("argument"),
|
||||
String::from("1234"),
|
||||
String::from("0x123"),
|
||||
String::from("abcd"),
|
||||
];
|
||||
let case: Vec<String> = words(testcase);
|
||||
assert_eq!(case, verify);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user