diff options
| author | mo8it <mo8it@proton.me> | 2024-08-20 13:39:14 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-08-20 13:39:14 +0200 |
| commit | e74f2a4274e22faf050a1229b4526ceb53b55479 (patch) | |
| tree | 955c099f224c285b3dbb0f7789a302db0cb34d02 /src/dev | |
| parent | d141a73493ede10cb5d97cdd16b08560fa44de25 (diff) | |
Check for `#[test]` with newline at the end
Diffstat (limited to 'src/dev')
| -rw-r--r-- | src/dev/check.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs index 626a9c5..6cc2485 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -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"); } |
