MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_load_dirty_with_name_abort

Function test_load_dirty_with_name_abort

std/src/program.rs:787–806  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 8

expect_programMethod · 0.80
set_programMethod · 0.80
write_fileMethod · 0.80
checkMethod · 0.45
expect_fileMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45
add_input_charsMethod · 0.45

Tested by

no test coverage detected