diff mbox series

[2/7] Fix two wrongs in test suppression regex

Message ID 20200817093819.172380-3-gprocida@google.com
State New
Headers show
Series Suppression parsing - preparatory work | expand

Commit Message

Giuliano Procida Aug. 17, 2020, 9:38 a.m. UTC
The suppression specification in test38-char-class-in-ini.abignore was
introduced in commit 1478d9cc1c74ca3a2be89cd09aac5afcbdf818c7.

Unfortunately it contains two errors. One causes the file name not to
match as the string is the full path, not the base name. The other is
a typo that causes the file name match not to even be attempted. The
two mistakes cancel in the test, but result in a suppression
specification that is broader than intended.

	* tests/data/test-diff-suppr/test38-char-class-in-ini.abignore:
	Don't anchor regex match to beginning of file name.
	Change "filename_regexp" to "file_name_regexp".

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 tests/data/test-diff-suppr/test38-char-class-in-ini.abignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dodji Seketeli Oct. 1, 2020, 2:42 p.m. UTC | #1
Giuliano Procida <gprocida@google.com> a écrit:

> The suppression specification in test38-char-class-in-ini.abignore was
> introduced in commit 1478d9cc1c74ca3a2be89cd09aac5afcbdf818c7.
>
> Unfortunately it contains two errors. One causes the file name not to
> match as the string is the full path, not the base name. The other is
> a typo that causes the file name match not to even be attempted. The
> two mistakes cancel in the test, but result in a suppression
> specification that is broader than intended.
>
> 	* tests/data/test-diff-suppr/test38-char-class-in-ini.abignore:
> 	Don't anchor regex match to beginning of file name.
> 	Change "filename_regexp" to "file_name_regexp".
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

[...]

Cheers,
diff mbox series

Patch

diff --git a/tests/data/test-diff-suppr/test38-char-class-in-ini.abignore b/tests/data/test-diff-suppr/test38-char-class-in-ini.abignore
index 07f3f91f8..e96240cd4 100644
--- a/tests/data/test-diff-suppr/test38-char-class-in-ini.abignore
+++ b/tests/data/test-diff-suppr/test38-char-class-in-ini.abignore
@@ -1,4 +1,4 @@ 
 [suppress_function]
- filename_regexp = ^test38-char-class-in-ini-v[[:digit:]].*
+ file_name_regexp = test38-char-class-in-ini-v[[:digit:]].*
  symbol_name_regexp = bar
  change_kind = added-function