mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -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)
|
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]
|
#[test]
|
||||||
fn test_tokenize_one_of_each() {
|
fn test_tokenize_one_of_each() {
|
||||||
let result = tokenize(LocatedSpan::new(
|
let result = tokenize(LocatedSpan::new(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user