Skip to content

Commit e74f2a4

Browse files
committed
Check for #[test] with newline at the end
1 parent d141a73 commit e74f2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dev/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> {
9797
bail!("Didn't find any `// TODO` comment in the file `{path}`.\nYou need to have at least one such comment to guide the user.");
9898
}
9999

100-
if !exercise_info.test && file_buf.contains("#[test]") {
100+
if !exercise_info.test && file_buf.contains("#[test]\n") {
101101
bail!("The file `{path}` contains tests annotated with `#[test]` but the exercise `{name}` has `test = false` in the `info.toml` file");
102102
}
103103

0 commit comments

Comments
 (0)