Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.Test;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Unit tests of {@link I18n}.
|
---|
10 | */
|
---|
11 | class I18nTest {
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit test of {@link I18n#escape}.
|
---|
15 | */
|
---|
16 | @Test
|
---|
17 | void testEscape() {
|
---|
18 | String foobar = "{foo'bar}";
|
---|
19 | assertEquals("'{'foo''bar'}'", I18n.escape(foobar));
|
---|
20 | assertEquals(foobar, I18n.tr(I18n.escape(foobar)));
|
---|
21 | }
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.