summaryrefslogtreecommitdiff
path: root/tests/integration_tests.rs
diff options
context:
space:
mode:
authormarisa <mokou@posteo.de>2019-11-11 17:21:06 +0100
committerGitHub <noreply@github.com>2019-11-11 17:21:06 +0100
commitec2d4bd3ee665f2a4c79dd42c41078223074d4c1 (patch)
tree6106b922559491112240f6465f965cf811caf5b8 /tests/integration_tests.rs
parentce9fa6ebbfdc3e7585d488d9409797285708316f (diff)
parent9a9007abae86c3b1b1c09778a6544ced54ea4453 (diff)
Merge branch 'master' into refactor-hints
Diffstat (limited to 'tests/integration_tests.rs')
-rw-r--r--tests/integration_tests.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 24268ec..32f4341 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -1,4 +1,7 @@
use assert_cmd::prelude::*;
+use glob::glob;
+use std::fs::File;
+use std::io::Read;
use std::process::Command;
#[test]
@@ -115,4 +118,20 @@ fn get_hint_for_single_test() {
.assert()
.code(0)
.stdout("Hello!\n");
+
+#[test]
+fn all_exercises_require_confirmation() {
+ for exercise in glob("exercises/**/*.rs").unwrap() {
+ let path = exercise.unwrap();
+ 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().expect(&format!(
+ "There should be an `I AM NOT DONE` annotation in {:?}",
+ path
+ ));
+ }
}