Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultKeyboardLayoutName does not return the country on Mac #13

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use Snow Leopard 10.6.4 with 
java -version 
java version "1.6.0_20" 
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065) 
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode) 

IntelliJ IDEA 9.0.3 Community Edition 


2. Run the following unit test (change DE to your country, I did add it to 
KeyboardLayoutTest):
@Test
    public void getsCorrectCountry() {
        String country = InputContext.getInstance().getLocale().getCountry();
        assertThat(country, is("DE"));    
    }

3. Result is
java.lang.AssertionError: 
Expected: is "DE"
     got: ""

    at org.junit.Assert.assertThat(Assert.java:502)
    at org.junit.Assert.assertThat(Assert.java:492)
    at com.objogate.wl.keyboard.tests.KeyboardLayoutTest.getsCorrectCountry(KeyboardLayoutTest.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
    at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
    at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
    at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
    at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
    at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
    at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:130)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)


What is the expected output? What do you see instead?
See result of unit test above

What version of the product are you using? On what operating system?
see above
r268 from 01. Sept. 2010


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Sep 2010 at 4:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant