locale: Test string_resolve
This commit is contained in:
parent
6af621213a
commit
3f88e96395
18
locale/string_test.ha
Normal file
18
locale/string_test.ha
Normal file
@ -0,0 +1,18 @@
|
||||
@test fn string_resolve() void = {
|
||||
assert(string_resolve([
|
||||
(c, "c"),
|
||||
(parse("xx_XX")!, "xx_XX"),
|
||||
], c) as str == "c");
|
||||
assert(string_resolve([
|
||||
(c, "c"),
|
||||
(parse("xx_XX")!, "xx_XX"),
|
||||
], parse("xx_XX.UTF-8")!) as str == "xx_XX");
|
||||
assert(string_resolve([
|
||||
(c, "c"),
|
||||
(parse("xx_XX")!, "xx_XX"),
|
||||
], parse("yy_YY.UTF-8")!) as str == "c");
|
||||
assert(string_resolve([
|
||||
(parse("xx_XX")!, "xx_XX"),
|
||||
(parse("zz_ZZ")!, "zz_ZZ"),
|
||||
], parse("yy_YY")!) is void);
|
||||
};
|
Loading…
Reference in New Issue
Block a user