Skip to content

Commit

Permalink
php-version: Improve regex definitions in unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
markuslf committed Oct 27, 2023
1 parent 28fe1b2 commit 23c2c3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions check-plugins/php-version/unit-test/run
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TestCheck(unittest.TestCase):
check_minor = False,
check_patch = False,
)
self.assertRegex(msg, 'EOL 2021-12-06 -30d \[WARNING\], major .* available, minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertRegex(msg, r'EOL 2021-12-06 -30d \[WARNING\], major .* available, minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertEqual(retc, STATE_WARN)

def test_if_check_runs_php02(self):
Expand All @@ -63,7 +63,7 @@ class TestCheck(unittest.TestCase):
check_minor = False,
check_patch = False,
)
self.assertRegex(msg, 'EOL 2021-12-06 \+9999d, major .* available, minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertRegex(msg, r'EOL 2021-12-06 \+9999d, major .* available, minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertEqual(retc, STATE_OK)

def test_if_check_runs_php04(self):
Expand All @@ -75,7 +75,7 @@ class TestCheck(unittest.TestCase):
check_minor = False,
check_patch = False,
)
self.assertRegex(msg, 'EOL 2021-12-06 -30d \[WARNING\], major .* available \[WARNING\], minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertRegex(msg, r'EOL 2021-12-06 -30d \[WARNING\], major .* available \[WARNING\], minor 7\.4\.33 available, patch 7\.3\.33 available')
self.assertEqual(retc, STATE_WARN)

def test_if_check_runs_php05(self):
Expand Down

0 comments on commit 23c2c3f

Please sign in to comment.