mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
Enable tests that were accidentally disabled
This commit is contained in:
parent
a707cd09c4
commit
22873cacf4
3 changed files with 11 additions and 9 deletions
|
@ -83,7 +83,7 @@ pub fn kill_entries() -> Vec<WString> {
|
|||
KILL_RING.lock().unwrap().entries()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn test_killring() {
|
||||
let mut kr = KillRing::new();
|
||||
|
||||
|
@ -93,13 +93,13 @@ fn test_killring() {
|
|||
kr.add(WString::from_str("b"));
|
||||
kr.add(WString::from_str("c"));
|
||||
|
||||
assert!((kr.entries() == [L!("c"), L!("b"), L!("a")]));
|
||||
assert!(kr.entries() == [L!("c"), L!("b"), L!("a")]);
|
||||
|
||||
assert!(kill_yank_rotate() == L!("b"));
|
||||
assert!((kr.entries() == [L!("b"), L!("a"), L!("c")]));
|
||||
assert!(kr.yank_rotate() == L!("b"));
|
||||
assert!(kr.entries() == [L!("b"), L!("a"), L!("c")]);
|
||||
|
||||
assert!(kill_yank_rotate() == L!("a"));
|
||||
assert!((kr.entries() == [L!("a"), L!("c"), L!("b")]));
|
||||
assert!(kr.yank_rotate() == L!("a"));
|
||||
assert!(kr.entries() == [L!("a"), L!("c"), L!("b")]);
|
||||
|
||||
kr.add(WString::from_str("d"));
|
||||
|
||||
|
|
|
@ -124,6 +124,8 @@ fn test_universal_output() {
|
|||
assert_eq!(text, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_universal_parsing() {
|
||||
test_init();
|
||||
let input = concat!(
|
||||
|
|
|
@ -307,7 +307,7 @@ mod tests {
|
|||
use super::*;
|
||||
use crate::wchar::L;
|
||||
/// Write some tests.
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn test_find_char() {
|
||||
assert_eq!(Some(0), L!("abc").find_char('a'));
|
||||
assert_eq!(Some(1), L!("abc").find_char('b'));
|
||||
|
@ -315,7 +315,7 @@ mod tests {
|
|||
assert_eq!(None, L!("").find_char('X'));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn test_prefix() {
|
||||
assert!(L!("").starts_with(L!("")));
|
||||
assert!(L!("abc").starts_with(L!("")));
|
||||
|
@ -325,7 +325,7 @@ mod tests {
|
|||
assert!(L!("abc").starts_with(&WString::from_str("abc")));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn test_suffix() {
|
||||
assert!(L!("").ends_with(L!("")));
|
||||
assert!(L!("abc").ends_with(L!("")));
|
||||
|
|
Loading…
Reference in a new issue