Skip to content

Commit fd0844a

Browse files
committed
Added more non-ascii characters
1 parent 2c35852 commit fd0844a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DotNext.Tests/IO/FileUriTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public static TheoryData<string, string> GetPaths()
1616
data.Add(@"C:\with\..\relative\.\components\", @"C:\relative\components\");
1717
data.Add(@"C:\with\specials\chars\#\$\", @"C:\with\specials\chars\#\$\");
1818
data.Add(@"C:\с\кириллицей", @"C:\с\кириллицей");
19+
data.Add(@"C:\ελληνικά\γράμματα", @"C:\ελληνικά\γράμματα");
1920
data.Add(@"\\unc\path", @"\\unc\path");
2021
data.Add(@"\\?\dos\device", @"\\?\dos\device");
2122
data.Add(@"\\.\dos\device", @"\\.\dos\device");
@@ -29,6 +30,7 @@ public static TheoryData<string, string> GetPaths()
2930
data.Add("/with/../relative/./components/", "/relative/components/");
3031
data.Add("/with/special/chars/?/>/</", "/with/special/chars/?/>/</");
3132
data.Add("/с/кириллицей", "/с/кириллицей");
33+
data.Add("/ελληνικά/γράμματα", "/ελληνικά/γράμματα");
3234
}
3335

3436
return data;
@@ -47,7 +49,7 @@ public static void EncodeAsUri(string fileName, string expected)
4749
[MemberData(nameof(GetPaths))]
4850
public static void EncodeAsUriChars(string fileName, string expected)
4951
{
50-
Span<char> buffer = stackalloc char[256];
52+
Span<char> buffer = stackalloc char[512];
5153
True(FileUri.TryEncode(fileName, UrlEncoder.Default, buffer, out var charsWritten));
5254

5355
var uri = new Uri(buffer.Slice(0, charsWritten).ToString(), UriKind.Absolute);

0 commit comments

Comments
 (0)