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