Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40110

Behat test failing because of AM hardcoded being "AM" and "PM" OS-dependant strings

    Details

      Description

      The AM/PM string is OS-dependant, on Mac OSX it is lowercased.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dmonllao David Monllaó added a comment -

            Adding pull branches removing the AM/PM from the test as in not specially important and the workaround to include the AM/PM checking is tricky.

            The same patch can be applied to 2.5 and master

            Show
            dmonllao David Monllaó added a comment - Adding pull branches removing the AM/PM from the test as in not specially important and the workaround to include the AM/PM checking is tricky. The same patch can be applied to 2.5 and master
            Hide
            fred Frédéric Massart added a comment -

            Hi David, if you confirm that you cannot control whether the date will displayed with 'AM/PM' or in 24h format, then push for integration. Otherwise, you could change the time to a PM one. Cheers! Fred

            Show
            fred Frédéric Massart added a comment - Hi David, if you confirm that you cannot control whether the date will displayed with 'AM/PM' or in 24h format, then push for integration. Otherwise, you could change the time to a PM one. Cheers! Fred
            Hide
            poltawski Dan Poltawski added a comment - - edited

            From: http://php.net/manual/en/function.strftime.php
            Mac OS X only: The %P modifier is not supported in the Mac OS X implementation of this function.

            userdate by default uses:

            $string['strftimedaydatetime'] = '%A, %d %B %Y, %I:%M %p';
            

            Show
            poltawski Dan Poltawski added a comment - - edited From: http://php.net/manual/en/function.strftime.php Mac OS X only: The %P modifier is not supported in the Mac OS X implementation of this function. userdate by default uses: $string['strftimedaydatetime'] = '%A, %d %B %Y, %I:%M %p';
            Hide
            dmonllao David Monllaó added a comment -

            Thanks Fred and Dan

            Show
            dmonllao David Monllaó added a comment - Thanks Fred and Dan
            Hide
            poltawski Dan Poltawski added a comment -

            Hi David,

            FYI - the same branch can't be pulled into both master and 25 (try for yourself doing a git pull) so please create separate branches (preffered) or ask an integrator to cherry-pick. Else I try and pull it and create a mess . In the future we hope to do automatic checks based on branches, so thats why its prefferable to have branches.

            Show
            poltawski Dan Poltawski added a comment - Hi David, FYI - the same branch can't be pulled into both master and 25 (try for yourself doing a git pull) so please create separate branches (preffered) or ask an integrator to cherry-pick. Else I try and pull it and create a mess . In the future we hope to do automatic checks based on branches, so thats why its prefferable to have branches.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master and 25, thanks David

            Show
            poltawski Dan Poltawski added a comment - Integrated to master and 25, thanks David
            Hide
            poltawski Dan Poltawski added a comment -

            Tested on my mac, was broken before, thsi fixes the issue

            Show
            poltawski Dan Poltawski added a comment - Tested on my mac, was broken before, thsi fixes the issue
            Hide
            dmonllao David Monllaó added a comment -

            Thanks for the info Dan, I didn't notice as I usually fetch & cherry-pick, sorry about that

            Show
            dmonllao David Monllaó added a comment - Thanks for the info Dan, I didn't notice as I usually fetch & cherry-pick, sorry about that
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks for your contributions!

            _main:
            @ BB#0:
                    push    {r7, lr}
                    mov     r7, sp
                    sub     sp, #4
                    movw    r0, :lower16:(L_.str-(LPC0_0+4))
                    movt    r0, :upper16:(L_.str-(LPC0_0+4))
            LPC0_0:
                    add     r0, pc
                    bl      _printf
                    movs    r1, #0
                    movt    r1, #0
                    str     r0, [sp]                @ 4-byte Spill
                    mov     r0, r1
                    add     sp, #4
                    pop     {r7, pc}
             
                    .section        __TEXT,__cstring,cstring_literals
            L_.str:                                 @ @.str
                    .asciz   "This code is now upstream!"
            

            Show
            poltawski Dan Poltawski added a comment - Thanks for your contributions! _main: @ BB#0: push {r7, lr} mov r7, sp sub sp, #4 movw r0, :lower16:(L_.str-(LPC0_0+4)) movt r0, :upper16:(L_.str-(LPC0_0+4)) LPC0_0: add r0, pc bl _printf movs r1, #0 movt r1, #0 str r0, [sp] @ 4-byte Spill mov r0, r1 add sp, #4 pop {r7, pc}   .section __TEXT,__cstring,cstring_literals L_.str: @ @.str .asciz "This code is now upstream!"

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13