@Test
public void compare() {

    AlphanumComparator c = new AlphanumComparator(new Locale("es"));
    assertEquals(0, c.compare("Hello", "Hello"));
    assertEquals(0, c.compare("Hello World", "Hello World"));
    assertEquals(-1, c.compare("Hello", "World"));
    assertEquals(1, c.compare("World", "Hello"));
    assertEquals(1, c.compare("World 1", "World"));
    assertEquals(-1, c.compare("World", "World 1"));
    assertEquals(-1, c.compare("Hello 1", "World"));
    assertEquals(0, c.compare("Hello 1", "Hello 1"));
    assertEquals(0, c.compare("Hello 1 World", "Hello 1 World"));
    assertEquals(-1, c.compare("Hello 1 World", "Hello 1 Zoo"));
    assertEquals(1, c.compare("Hello 10 World", "Hello 1 Zoo"));
    assertEquals(1, c.compare("Hello 1 World 10", "Hello 1 World 2"));
    assertEquals(1, c.compare("Hello 1 World 10 b", "Hello 1 World 10 a"));
    assertEquals(1, c.compare("axa 2", "aña 10"));
    assertEquals(-1, c.compare("aña 10", "axi 2"));
    assertEquals(-1, c.compare("ana 10", "aña 10"));
    assertEquals(1, c.compare("Tile 2", "File 10"));
    assertEquals(1, c.compare("Zoo 2", "File 10"));
    assertEquals(-1, c.compare("File 2", "File 10"));
    assertEquals(1, c.compare("File 10", "File 2"));
    assertEquals(-1, c.compare("File2", "File10"));
    assertEquals(1, c.compare("File10", "File2"));
    assertEquals(-1, c.compare("2", "File 10"));
    assertEquals(-1, c.compare("10", "File 2"));
    assertEquals(-1, c.compare("2", "10 File"));
    assertEquals(1, c.compare("10", "2 File"));
    assertEquals(-1, c.compare("2", "2 File"));
    assertEquals(1, c.compare("1 File", "1"));
    assertEquals(-1, c.compare("2", "File"));
    assertEquals(1, c.compare("File", "1"));
    assertEquals(-1, c.compare("Hello 2", "Hello File 10"));
    assertEquals(-1, c.compare("Hello 10", "Hello File 2"));
    assertEquals(-1, c.compare("2", "10"));
    assertEquals(1, c.compare("2", "1"));
    assertEquals(1, c.compare("-2", "2"));
    assertEquals(1, c.compare("-0.5", "-0.1"));
    assertEquals(1, c.compare("-0.5", "-0.1e1"));
    assertEquals(1, c.compare("1-2", "1-1"));
    assertEquals(1, c.compare("1 -2", "1 -1"));
    assertEquals(-1, c.compare("Manana", "Mañana"));
}