Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for unknown file check directives and fix a broken test. (FuelL…
…abs#2185) * Check for unknown file check directives and fix a broken test. This commit makes sure we emit an error when tests contain an unknown FileCheck directives, to prevent introducing broken tests to the tree. Previously we just ignored unknown directives. Instead of passing the entire test text to FileCheck, we now parse the test for directives and add it to the checker one-by-one, making sure to deal with errors. For a broken test, this now emits: ``` thread 'main' panicked at 'Discovering tests should_fail/match_expressions_rest/test.toml: Failed to parse: Unknown FileCheck directive: nextnl', test/src/e2e_vm_tests/mod.rs:45:9 ``` Also fixes a non-working test originally introduced in FuelLabs@2c5564b, due to a simple typo. * Simplify the code. * Tighten the regex with multiline mode. * Fix clippy. Co-authored-by: Emily Herbert <[email protected]> Co-authored-by: Toby Hutton <[email protected]>
- Loading branch information