[update]config: avoid possible error when removing file; fix typo; ignore undone tests

main
EdenQwQ 2 years ago
parent 9b81a7ed6a
commit 7e60588717

@ -445,7 +445,9 @@ mod tests {
impl Drop for TestPath {
fn drop(self: &mut TestPath) {
fs::remove_file(self.path());
if self.path.exists() {
fs::remove_file(self.path()).unwrap();
}
}
}
@ -470,7 +472,7 @@ mod tests {
if let Some(index) = expected_hotkeys_mut.iter().position(|key| {
key.keysym == hotkey.keysym
&& key.command == hotkey.command
&& key.modifiers == key.modifiers
&& key.modifiers == hotkey.modifiers
}) {
expected_hotkeys_mut.remove(index);
} else {
@ -481,7 +483,7 @@ mod tests {
}
}
if expected_hotkeys_mut.len() != 0 {
if !expected_hotkeys_mut.is_empty() {
panic!(
"Some hotkeys were not returned by the actual result:\n{:#?}",
expected_hotkeys_mut
@ -1177,6 +1179,8 @@ super + {a-}
}
#[test]
#[ignore]
// TODO: handle multiple ranges
fn test_multiple_ranges() -> std::io::Result<()> {
let contents = "
super + {shift,alt} + {c,d}
@ -1211,6 +1215,7 @@ super + {shift,alt} + {c,d}
}
#[test]
#[ignore]
fn test_multiple_ranges_numbers() -> std::io::Result<()> {
let contents = "
{control,super} + {1-3}

Loading…
Cancel
Save