()
| 1137 | |
| 1138 | #[test] |
| 1139 | fn test_save_ok_explicit_name() { |
| 1140 | let content = "\n some line \n "; |
| 1141 | for (explicit, actual, canonical) in &[ |
| 1142 | ("first", "MEMORY:/first.bas", "MEMORY:first.bas"), |
| 1143 | ("second.bas", "MEMORY:/second.bas", "MEMORY:second.bas"), |
| 1144 | ("THIRD", "MEMORY:/THIRD.BAS", "MEMORY:THIRD.BAS"), |
| 1145 | ("FOURTH.BAS", "MEMORY:/FOURTH.BAS", "MEMORY:FOURTH.BAS"), |
| 1146 | ("Fifth", "MEMORY:/Fifth.bas", "MEMORY:Fifth.bas"), |
| 1147 | ] { |
| 1148 | Tester::default() |
| 1149 | .set_program(Some("before.bas"), content) |
| 1150 | .run(format!(r#"SAVE "{}""#, explicit)) |
| 1151 | .expect_program(Some(*canonical), content) |
| 1152 | .expect_prints([format!("Saved as {}", canonical)]) |
| 1153 | .expect_file(*actual, content) |
| 1154 | .check(); |
| 1155 | } |
| 1156 | } |
| 1157 | |
| 1158 | #[test] |
| 1159 | fn test_save_reuse_name() { |
nothing calls this directly
no test coverage detected