mirror of
https://github.com/crate-ci/typos.git
synced 2026-12-03 09:37:47 +01:00
test(varcon): Show basic plural parsing
This commit is contained in:
1 parent
198f9d80e5
commit
5e00c161a6
1 file changed
+48
@@ -1299,6 +1299,54 @@ Entry {
|
||||
comment: None,
|
||||
}
|
||||
|
||||
"#]]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_plural() {
|
||||
// Having nothing after `A` causes an incomplete parse. Shouldn't be a problem for my use
|
||||
// cases.
|
||||
let (input, actual) = Entry::parse_.parse_peek("_ _-: dogies | <pl>\n").unwrap();
|
||||
assert_data_eq!(
|
||||
input,
|
||||
str![[r#"
|
||||
|
||||
|
||||
"#]]
|
||||
);
|
||||
assert_data_eq!(
|
||||
actual.to_debug(),
|
||||
str![[r#"
|
||||
Entry {
|
||||
variants: [
|
||||
Variant {
|
||||
types: [
|
||||
Type {
|
||||
category: Other,
|
||||
tag: None,
|
||||
num: None,
|
||||
},
|
||||
Type {
|
||||
category: Other,
|
||||
tag: Some(
|
||||
Possible,
|
||||
),
|
||||
num: None,
|
||||
},
|
||||
],
|
||||
word: "dogies",
|
||||
},
|
||||
],
|
||||
pos: None,
|
||||
archaic: false,
|
||||
note: false,
|
||||
description: Some(
|
||||
"<pl>",
|
||||
),
|
||||
comment: None,
|
||||
}
|
||||
|
||||
"#]]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user