mod api;
mod cite;
mod gallery;
mod image;
mod indicator;
mod parsoid;
pub(crate) mod test_client;
use super::*;
#[test]
fn test_clean_link() {
assert_eq!(
clean_link("./Template:Foo_bar"),
"Template:Foo bar".to_string()
);
assert_eq!(clean_link("ifeq"), "ifeq".to_string());
}
#[test]
fn test_full_link() {
assert_eq!(
full_link("Template:Foo bar"),
"./Template:Foo_bar".to_string()
);
assert_eq!(full_link("ifeq"), "./ifeq".to_string());
}
#[test]
fn test_attribute_contains_word() {
assert!(attribute_contains_word("mw:Foo", "mw:Foo")); assert!(!attribute_contains_word("mw:Foo", "mw:Bar")); assert!(attribute_contains_word("mw:Foo mw:Bar", "mw:Bar")); assert!(!attribute_contains_word("mw:Foo/Bar", "mw:Foo")); }