source: josm/trunk/test/unit/org/openstreetmap/josm/tools/I18nTest.java@ 11974

Last change on this file since 11974 was 11404, checked in by Don-vip, 7 years ago

replace groovy validator unit tests by java ones

  • Property svn:eol-style set to native
File size: 485 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools;
3
4import static org.junit.Assert.assertEquals;
5
6import org.junit.Test;
7
8/**
9 * Unit tests of {@link I18n}.
10 */
11public class I18nTest {
12
13 /**
14 * Unit test of {@link I18n#escape}.
15 */
16 @Test
17 public 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.