From 4fe6e2cf5ba1989f82e5bd4b968e459dd5775759 Mon Sep 17 00:00:00 2001 From: Richardas Kuchinskas Date: Fri, 31 Jan 2025 16:53:04 +0300 Subject: [PATCH] tests --- src/tests/infra/pathRulesSet_config_test.go | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/tests/infra/pathRulesSet_config_test.go b/src/tests/infra/pathRulesSet_config_test.go index df027b21..3632db57 100644 --- a/src/tests/infra/pathRulesSet_config_test.go +++ b/src/tests/infra/pathRulesSet_config_test.go @@ -32,6 +32,20 @@ func pathRulesSetInit(t *testing.T) *linttest.Suite { "undefinedFunction": true, }, }, + "star/*/tests": { + Enabled: map[string]bool{ + "emptyStmt": true, + }, + Disabled: map[string]bool{}, + }, + "mixed/*/tests": { + Enabled: map[string]bool{ + "emptyStmt": true, + }, + Disabled: map[string]bool{ + "undefinedFunction": true, + }, + }, }) var suite = linttest.NewSuite(t) @@ -63,6 +77,50 @@ require_once 'foo.php';; test.RunAndMatch() } +func TestStarPath(t *testing.T) { + test := pathRulesSetInit(t) + code := `