Add new test case.
authorfunilrys <redacted>
Sat, 5 Aug 2023 19:00:55 +0000 (21:00 +0200)
committerfunilrys <redacted>
Sat, 5 Aug 2023 19:00:55 +0000 (21:00 +0200)
Indeed, even with the original regex, the following test doesn't
pass. Therefore, it is necessary to add it into the tests.

www.example-3045.foobar.com

testUpdateHostsFile.py

index 33b820fe1edee3b87de76c3ce16290ff1e7b9423..59bae8e61a19d0273d9c21f78f73de962fd61e5e 100644 (file)
@@ -905,7 +905,7 @@ class TestNormalizeRule(BaseStdout):
             sys.stdout = StringIO()
 
     def test_no_comment_raw(self):
-        for rule in ("twitter.com", "google.com", "foo.bar.edu", "www.example-foo.bar.edu"):
+        for rule in ("twitter.com", "google.com", "foo.bar.edu", "www.example-foo.bar.edu", "www.example-3045.foobar.com"):
             expected = (rule, "0.0.0.0 " + rule + "\n")
 
             actual = normalize_rule(
git clone https://git.99rst.org/PROJECT