Remove "I AM NOT DONE" and the verify mode and add AppState

This commit is contained in:
mo8it
2024-04-11 02:51:02 +02:00
parent 4bb6bda9f6
commit fa1f239a70
113 changed files with 306 additions and 769 deletions
@@ -1,7 +1,5 @@
// fake_exercise
// I AM NOT DONE
fn main() {
}
@@ -1,4 +1,2 @@
// I AM NOT DONE
#[test]
fn it_works() {}
+1 -27
View File
@@ -1,7 +1,6 @@
use assert_cmd::prelude::*;
use glob::glob;
use predicates::boolean::PredicateBooleanExt;
use std::{fs::File, io::Read, process::Command};
use std::process::Command;
#[test]
fn fails_when_in_wrong_dir() {
@@ -137,31 +136,6 @@ fn get_hint_for_single_test() {
.stdout("Hello!\n");
}
#[test]
fn all_exercises_require_confirmation() {
for exercise in glob("exercises/**/*.rs").unwrap() {
let path = exercise.unwrap();
if path.file_name().unwrap() == "mod.rs" {
continue;
}
let source = {
let mut file = File::open(&path).unwrap();
let mut s = String::new();
file.read_to_string(&mut s).unwrap();
s
};
source
.matches("// I AM NOT DONE")
.next()
.unwrap_or_else(|| {
panic!(
"There should be an `I AM NOT DONE` annotation in {:?}",
path
)
});
}
}
#[test]
fn run_compile_exercise_does_not_prompt() {
Command::cargo_bin("rustlings")