forked from icsharpcode/SharpZipLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringTesting.cs
More file actions
41 lines (36 loc) · 1.26 KB
/
Copy pathStringTesting.cs
File metadata and controls
41 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Collections.Generic;
namespace ICSharpCode.SharpZipLib.Tests.TestSupport
{
public static class StringTesting
{
static StringTesting()
{
AddLanguage("Chinese", "測試.txt", "big5");
AddLanguage("Greek", "Ϗΰ.txt", "windows-1253");
AddLanguage("Nordic", "Åæ.txt", "windows-1252");
AddLanguage("Arabic", "ڀڅ.txt", "windows-1256");
AddLanguage("Russian", "Прйвёт.txt", "windows-1251");
}
private static void AddLanguage(string language, string filename, string encoding)
{
languages.Add(language);
filenames.Add(filename);
encodings.Add(encoding);
entries++;
}
private static int entries = 0;
private static List<string> languages = new List<string>();
private static List<string> filenames = new List<string>();
private static List<string> encodings = new List<string>();
public static IEnumerable<string> Languages => filenames.AsReadOnly();
public static IEnumerable<string> Filenames => filenames.AsReadOnly();
public static IEnumerable<string> Encodings => filenames.AsReadOnly();
public static IEnumerable<(string language, string filename, string encoding)> GetTestSamples()
{
for (int i = 0; i < entries; i++)
{
yield return (languages[i], filenames[i], encodings[i]);
}
}
}
}