mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
Expand unit tests a little more
This commit is contained in:
parent
267b575e8b
commit
f2e7a8d7c9
@ -73,3 +73,5 @@ impl Converter for FlagConverter {
|
||||
self.write("", &v, &mut w)
|
||||
}
|
||||
}
|
||||
|
||||
// We need some unit tests for this now :D
|
||||
|
@ -590,6 +590,16 @@ mod tokenizer_test {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_tokenize_bareword_with_dash() {
|
||||
let result = tokenize(LocatedSpan::new("foo-bar "));
|
||||
assert!(result.is_ok(), format!("result {:?} is not ok", result));
|
||||
if let Ok(toks) = result {
|
||||
assert_eq!(toks.len(), 2);
|
||||
assert_eq!(toks[0].fragment, "foo-bar");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_tokenize_one_of_each() {
|
||||
let result = tokenize(LocatedSpan::new(
|
||||
|
Loading…
x
Reference in New Issue
Block a user