Commit 7892f914 authored by stratact's avatar stratact

Fix tests

parent 258dfe6a
Pipeline #1565 failed with stage
in 1 minute and 29 seconds
......@@ -124,4 +124,7 @@ fn main() {
// End loop
}
// Ensure that all writes to the history file are written before exiting.
con.history.commit_to_file();
}
......@@ -98,6 +98,7 @@ fn main() {
}
}
}
}
// Ensure that all writes to the history file are written before exiting.
con.history.commit_to_file();
}
......@@ -79,6 +79,7 @@ fn test_in_memory_history_truncating() {
h.push(Buffer::from("a")).unwrap();
h.push(Buffer::from("b")).unwrap();
}
h.commit_to_file();
assert_eq!(h.len(), 2);
}
......@@ -89,11 +90,12 @@ fn test_in_file_history_truncating() {
{
let mut h = History::new();
h.set_file_name_and_load_history(tmp_file)
h.set_file_name_and_load_history(tmp_file);
h.set_max_file_size(5);
for _ in 0..20 {
h.push(Buffer::from("a")).unwrap();
}
h.commit_to_file();
}
let f = fs::File::open(tmp_file.clone()).unwrap();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment