Ignore:
Timestamp:
2015-09-13T22:45:59+02:00 (9 years ago)
Author:
simon04
Message:

fix #10023 - Add history of Overpass queries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java

    r8510 r8756  
    130130        assertThat(Utils.getDurationString((long) (8.5 * 24 * 60 * 60 * 1000)), is("8 days 12 h"));
    131131    }
     132
     133    @Test
     134    public void testEscapeReservedCharactersHTML() throws Exception {
     135        assertThat(Utils.escapeReservedCharactersHTML("foo -> bar -> '&'"), is("foo -> bar -> '&'"));
     136    }
     137
     138    @Test
     139    public void testRestrictStringLines() throws Exception {
     140        assertThat(Utils.restrictStringLines("1\n2\n3", 2), is("1\n..."));
     141        assertThat(Utils.restrictStringLines("1\n2\n3", 3), is("1\n2\n3"));
     142        assertThat(Utils.restrictStringLines("1\n2\n3", 4), is("1\n2\n3"));
     143    }
    132144}
Note: See TracChangeset for help on using the changeset viewer.