Skip to content

Commit

Permalink
Multi
Browse files Browse the repository at this point in the history
  • Loading branch information
d-e-s-o committed Jan 2, 2024
1 parent 37ee346 commit 61b45c2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.rs
Expand Up @@ -591,6 +591,18 @@ mod tests {
assert_eq!(rl.peek(|s, p| (s.to_owned(), p)), (CString::new("123y").unwrap(), 4));
}

#[test]
fn multi_xxx() {
let mut rl1 = Readline::new();
assert_eq!(rl1.feed(b"abcdefg"), None);

let mut rl2 = Readline::new();
assert_eq!(rl2.feed(b"efghijl"), None);

assert_eq!(rl1.feed(b"\n").unwrap(), CString::new("abcdefg").unwrap());
assert_eq!(rl2.feed(b"\n").unwrap(), CString::new("efghijl").unwrap());
}

#[test]
#[should_panic(expected = "invalid cursor position")]
fn reset_panic() {
Expand Down

0 comments on commit 61b45c2

Please sign in to comment.