mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-25 15:10:26 +00:00
Check for #[test]
with newline at the end
This commit is contained in:
parent
d141a73493
commit
e74f2a4274
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> {
|
|||
bail!("Didn't find any `// TODO` comment in the file `{path}`.\nYou need to have at least one such comment to guide the user.");
|
||||
}
|
||||
|
||||
if !exercise_info.test && file_buf.contains("#[test]") {
|
||||
if !exercise_info.test && file_buf.contains("#[test]\n") {
|
||||
bail!("The file `{path}` contains tests annotated with `#[test]` but the exercise `{name}` has `test = false` in the `info.toml` file");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue