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

Function test_load_dirty_with_name_continue

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

Source from the content-addressed store, hash-verified

807
808 #[test]
809 fn test_load_dirty_with_name_continue() {
810 for answer in YES_ANSWERS {
811 Tester::default()
812 .add_input_chars("modified unnamed file\n")
813 .add_input_chars(answer)
814 .write_file("other.bas", "other file\n")
815 .set_program(Some("MEMORY:/named.bas"), "previous contents\n")
816 .run("EDIT: LOAD \"other.bas\"")
817 .expect_prints(["Current program MEMORY:/named.bas has unsaved changes!"])
818 .expect_clear()
819 .expect_program(Some("MEMORY:other.bas"), "other file\n")
820 .expect_file("MEMORY:/other.bas", "other file\n")
821 .check();
822 }
823 }
824
825 /// Checks errors that should be handled the same way by `LOAD` and `SAVE`.
826 fn check_load_save_common_errors(cmd: &str) {

Callers

nothing calls this directly

Calls 9

expect_programMethod · 0.80
expect_clearMethod · 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