Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-969

DatePatternToRegexTest fails on non English locale

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.1.3
    • 1.1.2
    • logback-core

    Description

      When I have Czech locale test fails.

      Failed tests: 
        DatePatternToRegexTest.timeZone:68->doTest:93->doTest:89->verify:105 [2009-IX-03 21:57:16 CEST] does not match regex [\d{4}-.{3,12}-\d{2} \d{2}:\d{2}:\d{2} .*]
        DatePatternToRegexTest.dot:62->doTest:93->doTest:89->verify:105 [2009.IX.03] does not match regex [\d{4}\..{3,12}\.\d{2}]
        DatePatternToRegexTest.month:56->doTest:93->doTest:89->verify:105 [2009-IX-03] does not match regex [\d{4}-.{3,12}-\d{2}]
        DatePatternToRegexTest.dayInWeek:74->doTest:93->doTest:89->verify:105 [2009-IX-Čt] does not match regex [\d{4}-.{3,12}-.{2,12}]
        DatePatternToRegexTest.amPm:81->doTest:93->doTest:89->verify:105 [2009-09-03 odp.] does not match regex [\d{4}-\d{2}-\d{2} .{2}]

      It looks like that CharSequenceToRegexMapper suppose that MMM means string of length from 3 to 12 chars. But SimpleDateFormat uses Locale names for months and it could be string of length 1 to n chars.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            ivo.smid Ivo Smid
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: