()
| 725 | |
| 726 | #[test] |
| 727 | fn test_load_ok() { |
| 728 | let content = "line 1\n\n line 2\n"; |
| 729 | for (explicit, canonical) in &[ |
| 730 | ("foo", "MEMORY:foo.bas"), |
| 731 | ("foo.bas", "MEMORY:foo.bas"), |
| 732 | ("BAR", "MEMORY:BAR.BAS"), |
| 733 | ("BAR.BAS", "MEMORY:BAR.BAS"), |
| 734 | ("Baz", "MEMORY:Baz.bas"), |
| 735 | ] { |
| 736 | Tester::default() |
| 737 | .write_file("foo.bas", content) |
| 738 | .write_file("foo.bak", "") |
| 739 | .write_file("BAR.BAS", content) |
| 740 | .write_file("Baz.bas", content) |
| 741 | .run(format!(r#"LOAD "{}""#, explicit)) |
| 742 | .expect_clear() |
| 743 | .expect_program(Some(*canonical), "line 1\n\n line 2\n") |
| 744 | .expect_file("MEMORY:/foo.bas", content) |
| 745 | .expect_file("MEMORY:/foo.bak", "") |
| 746 | .expect_file("MEMORY:/BAR.BAS", content) |
| 747 | .expect_file("MEMORY:/Baz.bas", content) |
| 748 | .check(); |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | #[test] |
| 753 | fn test_load_dirty_no_name_abort() { |
nothing calls this directly
no test coverage detected