Repository: microsoft/PowerToys
File: src/modules/launcher/Plugins/Microsoft.Plugin.Uri.UnitTests/UriHelper/ExtendedUriParserTests.cs (C#)

Code before:
        [DataRow("http://t", true, "http://t/", true, null)]
        [DataRow("http://te", true, "http://te/", true, null)]
        [DataRow("http://tes", true, "http://tes/", true, null)]
        [DataRow("http://test", true, "http://test/", true, null)]
        [DataRow("http://test.", false, null, false, null)]
        [DataRow("http://test.c", true, "http://test.c/", true, null)]
        [DataRow("http://test.co", true, "http://test.co/", true, null)]
        [DataRow("http://test.com", true, "http://test.com/", true, null)]
        [DataRow("http:3", true, "https://http:3/", true, null)]
        [DataRow("http://http:3", true, "http://http:3/", true, null)]
        [DataRow("[2001:0DB8::1]", true, "https://[2001:db8::1]/", true, null)]
        [DataRow("[2001:0DB8::1]:80", true, "http://[2001:db8::1]/", true, null)]
        [DataRow("[2001:0DB8::1]:443", true, "https://[2001:db8::1]/", true, null)]
        [DataRow("http://[2001:0DB8::1]", true, "http://[2001:db8::1]/", true, null)]
        [DataRow("http://[2001:0DB8::1]:80", true, "http://[2001:db8::1]/", true, null)]
        [DataRow("http://[2001:0DB8::1]:443", true, "http://[2001:db8::1]:443/", true, null)]
        [DataRow("https://[2001:0DB8::1]:80", true, "https://[2001:db8::1]:80/", true, null)]
        [DataRow("mailto:example@mail.com", true, "mailto:example@mail.com", false, null)]
        [DataRow("ftp://example.com", true, "ftp://example.com/", false, null)]
        [DataRow("ftp://example.com/test", true, "ftp://example.com/test", false, null)]
        [DataRow("ftp://example.com:123/test", true, "ftp://example.com:123/test", false, null)]
        [DataRow("ftp://example.com/126", true, "ftp://example.com/126", false, null)]
        [DataRow("http://test.test.test.test:952", true, "http://test.test.test.test:952/", true, null)]
        [DataRow("https://test.test.test.test:952", true, "https://test.test.test.test:952/", true, null)]

        // ToDo: Block[::] results in parser. Address is unspecified per RFCxxx and the results make no sense.
        [DataRow("[::]", true, "https://[::]/", true, null)]
        [DataRow("http://[::]", true, "http://[::]/", true, null)]

        // localhost, 127.0.0.1, ::1 tests
        [DataRow("localhost", true, "https://localhost/", true, null)]
        [DataRow("localhost:80", true, "http://localhost/", true, null)]
        [DataRow("localhost:443", true, "https://localhost/", true, null)]
        [DataRow("localhost:1234", true, "https://localhost:1234/", true, null)]
        [DataRow("localhost/test", true, "https://localhost/test", true, null)]
        [DataRow("localhost:80/test", true, "http://localhost/test", true, null)]
        [DataRow("localhost:443/test", true, "https://localhost/test", true, null)]
        [DataRow("localhost:1234/test", true, "https://localhost:1234/test", true, null)]
        [DataRow("http://localhost", true, "http://localhost/", true, null)]
        [DataRow("http://localhost:1234", true, "http://localhost:1234/", true, null)]
        [DataRow("https://localhost", true, "https://localhost/", true, null)]
        [DataRow("https://localhost:1234", true, "https://localhost:1234/", true, null)]
        [DataRow("http://localhost/test", true, "http://localhost/test", true, null)]
        [DataRow("http://localhost:1234/test", true, "http://localhost:1234/test", true, null)]
        [DataRow("https://localhost/test", true, "https://localhost/test", true, null)]
        [DataRow("https://localhost:1234/test", true, "https://localhost:1234/test", true, null)]
        [DataRow("127.0.0.1", true, "https://127.0.0.1/", true, null)]
        [DataRow("127.0.0.1:80", true, "http://127.0.0.1/", true, null)]
        [DataRow("127.0.0.1:443", true, "https://127.0.0.1/", true, null)]
        [DataRow("127.0.0.1:1234", true, "https://127.0.0.1:1234/", true, null)]
        [DataRow("127.0.0.1/test", true, "https://127.0.0.1/test", true, null)]

Review comment (suggestion):
```suggestion
        // ToDo: Block [::] address results in parser. This Address is unspecified per RFC 4291 and the results make no sense.
```


Code after:
        [DataRow("http://ht", true, "http://ht/", null)]
        [DataRow("http://htt", true, "http://htt/", null)]
        [DataRow("http://http", true, "http://http/", null)]
        [DataRow("http://t", true, "http://t/", null)]
        [DataRow("http://te", true, "http://te/", null)]
        [DataRow("http://tes", true, "http://tes/", null)]
        [DataRow("http://test", true, "http://test/", null)]
        [DataRow("http://test.", false, null, null)]
        [DataRow("http://test.c", true, "http://test.c/", null)]
        [DataRow("http://test.co", true, "http://test.co/", null)]
        [DataRow("http://test.com", true, "http://test.com/", null)]
        [DataRow("http:3", true, "https://http:3/", null)]
        [DataRow("http://http:3", true, "http://http:3/", null)]
        [DataRow("[2001:0DB8::1]", true, "https://[2001:db8::1]/", null)]
        [DataRow("[2001:0DB8::1]:80", true, "http://[2001:db8::1]/", null)]
        [DataRow("[2001:0DB8::1]:443", true, "https://[2001:db8::1]/", null)]
        [DataRow("http://[2001:0DB8::1]", true, "http://[2001:db8::1]/", null)]
        [DataRow("http://[2001:0DB8::1]:80", true, "http://[2001:db8::1]/", null)]
        [DataRow("http://[2001:0DB8::1]:443", true, "http://[2001:db8::1]:443/", null)]
        [DataRow("https://[2001:0DB8::1]:80", true, "https://[2001:db8::1]:80/", null)]
        [DataRow("http://test.test.test.test:952", true, "http://test.test.test.test:952/", null)]
        [DataRow("https://test.test.test.test:952", true, "https://test.test.test.test:952/", null)]

        // ToDo: Block [::] address results in parser. This Address is unspecified per RFC 4291 and the results make no sense.
        [DataRow("[::]", true, "https://[::]/", null)]
        [DataRow("http://[::]", true, "http://[::]/", null)]

        // localhost, 127.0.0.1, ::1 tests
        [DataRow("localhost", true, "https://localhost/", null)]
        [DataRow("localhost:80", true, "http://localhost/", null)]
        [DataRow("localhost:443", true, "https://localhost/", null)]
        [DataRow("localhost:1234", true, "https://localhost:1234/", null)]
        [DataRow("localhost/test", true, "https://localhost/test", null)]
        [DataRow("localhost:80/test", true, "http://localhost/test", null)]
        [DataRow("localhost:443/test", true, "https://localhost/test", null)]
        [DataRow("localhost:1234/test", true, "https://localhost:1234/test", null)]
        [DataRow("http://localhost", true, "http://localhost/", null)]
        [DataRow("http://localhost:1234", true, "http://localhost:1234/", null)]
        [DataRow("https://localhost", true, "https://localhost/", null)]
        [DataRow("https://localhost:1234", true, "https://localhost:1234/", null)]
        [DataRow("http://localhost/test", true, "http://localhost/test", null)]
        [DataRow("http://localhost:1234/test", true, "http://localhost:1234/test", null)]
        [DataRow("https://localhost/test", true, "https://localhost/test", null)]
        [DataRow("https://localhost:1234/test", true, "https://localhost:1234/test", null)]
        [DataRow("127.0.0.1", true, "https://127.0.0.1/", null)]
        [DataRow("127.0.0.1:80", true, "http://127.0.0.1/", null)]
        [DataRow("127.0.0.1:443", true, "https://127.0.0.1/", null)]
        [DataRow("127.0.0.1:1234", true, "https://127.0.0.1:1234/", null)]
        [DataRow("127.0.0.1/test", true, "https://127.0.0.1/test", null)]
        [DataRow("127.0.0.1:80/test", true, "http://127.0.0.1/test", null)]
        [DataRow("127.0.0.1:443/test", true, "https://127.0.0.1/test", null)]