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

Function test_kill_errors

std/src/storage/cmds.rs:869–898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

867
868 #[test]
869 fn test_kill_errors() {
870 Tester::default()
871 .run("KILL 3")
872 .expect_compilation_err("1:6: Expected STRING but found INTEGER")
873 .check();
874
875 Tester::default()
876 .run(r#"KILL "a/b.bas""#)
877 .expect_err("1:1: Too many / separators in path 'a/b.bas'")
878 .check();
879
880 Tester::default()
881 .run(r#"KILL "drive:""#)
882 .expect_err("1:1: Missing file name in path 'drive:'")
883 .check();
884
885 Tester::default()
886 .run("KILL")
887 .expect_compilation_err("1:1: KILL expected filename$")
888 .check();
889
890 check_stmt_err("1:1: Entry not found", r#"KILL "missing-file""#);
891
892 Tester::default()
893 .write_file("no-automatic-extension.bas", "")
894 .run(r#"KILL "no-automatic-extension""#)
895 .expect_err("1:1: Entry not found")
896 .expect_file("MEMORY:/no-automatic-extension.bas", "")
897 .check();
898 }
899
900 #[test]
901 fn test_mount_list() {

Callers

nothing calls this directly

Calls 7

check_stmt_errFunction · 0.85
write_fileMethod · 0.80
checkMethod · 0.45
runMethod · 0.45
expect_errMethod · 0.45
expect_fileMethod · 0.45

Tested by

no test coverage detected