[Hosts]Don't parse commented lines with an address and host in the middle (#26415)

This commit is contained in:
Davide Giacometti
2023-06-06 17:16:06 +02:00
committed by GitHub
parent 9960d2d536
commit f6f31c8c32
2 changed files with 6 additions and 11 deletions

View File

@@ -74,6 +74,7 @@ namespace Hosts.Tests
[DataRow("\t\thost\t\t10.1.1.1")]
[DataRow(" host 10.1.1.1")]
[DataRow("host 10.1.1.1")]
[DataRow("# comment 10.1.1.1 host # comment")]
public void Not_Valid_Entry(string line)
{
var entry = new Entry(0, line);