()
| 785 | |
| 786 | #[test] |
| 787 | fn test_load_dirty_with_name_abort() { |
| 788 | for answer in NO_ANSWERS { |
| 789 | Tester::default() |
| 790 | .add_input_chars("modified named file\n") |
| 791 | .add_input_chars(answer) |
| 792 | .write_file("other.bas", "other file\n") |
| 793 | .set_program(Some("MEMORY:/named.bas"), "previous contents\n") |
| 794 | .run("EDIT: LOAD \"other.bas\"") |
| 795 | .expect_prints([ |
| 796 | "Current program MEMORY:/named.bas has unsaved changes!", |
| 797 | "LOAD aborted; use SAVE to save your current changes.", |
| 798 | ]) |
| 799 | .expect_program( |
| 800 | Some("MEMORY:/named.bas"), |
| 801 | "previous contents\nmodified named file\n", |
| 802 | ) |
| 803 | .expect_file("MEMORY:/other.bas", "other file\n") |
| 804 | .check(); |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | #[test] |
| 809 | fn test_load_dirty_with_name_continue() { |
nothing calls this directly
no test coverage detected