Fix tests

1. for override test, test for something in `common`
2. move git mappings to `common`
This commit is contained in:
cyqsimon 2023-11-05 19:21:00 +08:00
parent 22531eab90
commit 1f10d846a3
No known key found for this signature in database
GPG Key ID: 1D8CE2F297390D65
2 changed files with 4 additions and 4 deletions

View File

@ -153,13 +153,13 @@ mod tests {
let mut map = SyntaxMapping::new();
assert_eq!(
map.get_syntax_for("/etc/profile"),
Some(MappingTarget::MapTo("Bourne Again Shell (bash)"))
map.get_syntax_for("/path/to/httpd.conf"),
Some(MappingTarget::MapTo("Apache Conf"))
);
map.insert("/etc/profile", MappingTarget::MapTo("My Syntax"))
map.insert("httpd.conf", MappingTarget::MapTo("My Syntax"))
.ok();
assert_eq!(
map.get_syntax_for("/etc/profile"),
map.get_syntax_for("/path/to/httpd.conf"),
Some(MappingTarget::MapTo("My Syntax"))
);
}