Changeset 14017 in josm for trunk/test


Ignore:
Timestamp:
2018-07-08T15:11:49+02:00 (13 months ago)
Author:
Don-vip
Message:

see #16453 - support dead keys. Drop ancient Polish keyboards not used anymore

File:
1 edited

Legend:

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

    r14012 r14017  
    44import static org.junit.Assert.assertEquals;
    55
     6import java.awt.event.KeyEvent;
    67import java.util.Arrays;
    78import java.util.LinkedHashMap;
     
    5354    @Test
    5455    public void testgetCharactersForKeyE00() {
    55         testgetCharactersForKeyE00("ar", 'ذ', '>', '`', '~');
    56         testgetCharactersForKeyE00("fr_FR", '²', '$', '`', '~');
    57         testgetCharactersForKeyE00("fr_CA", '#', '$', '/', '`', '~');
    58         testgetCharactersForKeyE00("sq", '\\', '`', '~');
    59         testgetCharactersForKeyE00("it", '\\', '`', '~');
    60         testgetCharactersForKeyE00("pt", '\\', '`', '~');
    61         testgetCharactersForKeyE00("pt_BR", '\'', '`', '~');
    62         testgetCharactersForKeyE00("de", '^', '`', '~');
    63         testgetCharactersForKeyE00("cs", ';', '`', '~');
    64         testgetCharactersForKeyE00("he", '`', '~');
    65         testgetCharactersForKeyE00("hu", '0', '`', '~');
    66         testgetCharactersForKeyE00("pl", 'µ', '^', '˛', '`', '~');
    67         testgetCharactersForKeyE00("bs", '¸', '`', '~');
    68         testgetCharactersForKeyE00("hr", '¸', '`', '~');
    69         testgetCharactersForKeyE00("sl", '¸', '`', '~');
    70         testgetCharactersForKeyE00("sr", '¸', '`', '~');
    71         testgetCharactersForKeyE00("ro", ']', '`', '~');
    72         testgetCharactersForKeyE00("da", '½', '`', '~');
    73         testgetCharactersForKeyE00("fo", '½', '`', '~');
    74         testgetCharactersForKeyE00("nl", '@', '`', '~');
    75         testgetCharactersForKeyE00("et", 'ˇ', '`', '~');
    76         testgetCharactersForKeyE00("is", '°', '`', '~');
    77         testgetCharactersForKeyE00("es", '|', '`', '~');
    78         testgetCharactersForKeyE00("es_ES", 'º', '`', '~');
    79         testgetCharactersForKeyE00("tr", '"', '*', '`', '~');
    80         testgetCharactersForKeyE00("de_LU", '^', '²', '§', '`', '~');
    81         testgetCharactersForKeyE00("fr_LU", '$', '²', '§', '`', '~');
    82         testgetCharactersForKeyE00("de_CH", '^', '§', '`', '~');
    83         testgetCharactersForKeyE00("fr_CH", '²', '$', '§', '`', '~');
    84         testgetCharactersForKeyE00("de_LI", '^', '§', '`', '~');
    85         testgetCharactersForKeyE00("fi_FI", '§', '`', '~');
    86         testgetCharactersForKeyE00("sv_SE", '§', '`', '~');
    87         testgetCharactersForKeyE00("no_NO", '|', '`', '~');
    88         testgetCharactersForKeyE00("sv_NO", '|', '`', '~');
     56        char deadCircumflex = (char) KeyEvent.VK_DEAD_CIRCUMFLEX;
     57        char deadGrave = (char) KeyEvent.VK_DEAD_GRAVE;
     58        char deadCaron = (char) KeyEvent.VK_DEAD_CARON;
     59        testgetCharactersForKeyE00("ar", 'ذ', '>', '`', deadGrave);
     60        testgetCharactersForKeyE00("fr_FR", '²', '$', '`', deadGrave);
     61        testgetCharactersForKeyE00("fr_CA", '#', '$', '/', '`', deadGrave);
     62        testgetCharactersForKeyE00("sq", '\\', '`', deadGrave);
     63        testgetCharactersForKeyE00("it", '\\', '`', deadGrave);
     64        testgetCharactersForKeyE00("pt", '\\', '`', deadGrave);
     65        testgetCharactersForKeyE00("pt_BR", '\'', '`', deadGrave);
     66        testgetCharactersForKeyE00("de", deadCircumflex, '`', deadGrave);
     67        testgetCharactersForKeyE00("cs", ';', '`', deadGrave);
     68        testgetCharactersForKeyE00("he", '`', deadGrave);
     69        testgetCharactersForKeyE00("hu", '0', '`', deadGrave);
     70        testgetCharactersForKeyE00("pl", '`', deadGrave);
     71        testgetCharactersForKeyE00("bs", '¸', '`', deadGrave);
     72        testgetCharactersForKeyE00("hr", '¸', '`', deadGrave);
     73        testgetCharactersForKeyE00("sl", '¸', '`', deadGrave);
     74        testgetCharactersForKeyE00("sr", '¸', '`', deadGrave);
     75        testgetCharactersForKeyE00("ro", ']', '`', deadGrave);
     76        testgetCharactersForKeyE00("da", '½', '`', deadGrave);
     77        testgetCharactersForKeyE00("fo", '½', '`', deadGrave);
     78        testgetCharactersForKeyE00("nl", '@', '`', deadGrave);
     79        testgetCharactersForKeyE00("et", deadCaron, '`', deadGrave);
     80        testgetCharactersForKeyE00("is", '°', '`', deadGrave);
     81        testgetCharactersForKeyE00("es", '|', '`', deadGrave);
     82        testgetCharactersForKeyE00("es_ES", 'º', '`', deadGrave);
     83        testgetCharactersForKeyE00("tr", '"', '*', '`', deadGrave);
     84        testgetCharactersForKeyE00("de_LU", deadCircumflex, '²', '§', '`', deadGrave);
     85        testgetCharactersForKeyE00("fr_LU", '$', '²', '§', '`', deadGrave);
     86        testgetCharactersForKeyE00("fr_CH", '²', '$', '§', '`', deadGrave);
     87        testgetCharactersForKeyE00("de_CH", deadCircumflex, '§', '`', deadGrave);
     88        testgetCharactersForKeyE00("de_LI", deadCircumflex, '§', '`', deadGrave);
     89        testgetCharactersForKeyE00("fi_FI", '§', '`', deadGrave);
     90        testgetCharactersForKeyE00("sv_SE", '§', '`', deadGrave);
     91        testgetCharactersForKeyE00("no_NO", '|', '`', deadGrave);
     92        testgetCharactersForKeyE00("sv_NO", '|', '`', deadGrave);
    8993    }
    9094
Note: See TracChangeset for help on using the changeset viewer.