mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-03 08:43:30 +02:00
Remove "I AM NOT DONE" and the verify mode and add AppState
This commit is contained in:
@@ -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,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")
|
||||
|
||||
Reference in New Issue
Block a user