mod shared;
use shared::fixtures::{
PrintTest,
PathTest,
};
use shared::mock_ui::Print;
#[test]
fn filename_default() {
PrintTest{
init_buffer: vec![],
init_clipboard: vec![],
command_input: vec![
"f",
],
expected_buffer: vec![],
expected_buffer_saved: true,
expected_selection: (1,0),
expected_clipboard: vec![],
expected_prints: vec![
Print{
text: vec!["path".to_owned()],
n: false,
l: false,
},
],
expected_history_tags: vec![],
}.run();
}
#[test]
fn filename() {
PathTest{
init_filepath: "old",
command_input: vec!["f new"],
expected_filepath: "new",
expected_history_tags: vec![],
}.run();
}
#[test]
fn filename_without_space() {
PathTest{
init_filepath: "old",
command_input: vec!["fnew"],
expected_filepath: "new",
expected_history_tags: vec![],
}.run();
}