Skip to content

Commit

Permalink
add regression test case for #4
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Oct 4, 2022
1 parent 0ca8573 commit ce5dc54
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/history.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use tui_textarea::TextArea;

// Regression test for #4
#[test]
fn disable_history() {
let mut t = TextArea::default();
t.set_max_histories(0);
assert!(t.insert_str("hello"));
assert_eq!(t.lines(), ["hello"]);
}
1 change: 1 addition & 0 deletions tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
mod cursor;
mod history;

0 comments on commit ce5dc54

Please sign in to comment.