Groovy
  1. Groovy
  2. GROOVY-2613

add 'transform to platform newline' function to the GDK String API

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6-rc-2, 1.5.8, 1.7-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      Triple quoted strings are very useful in unit tests. But there is a problem when you create the expected value with triple quoted strings and the actual value is for example produced by a writer. On windows the two values are not equal, as triple quoted strings use always '\' as the line separator. I don't know the reason why triple quoted strings behave like. But it would be nice to have a straight forward way to turn a triple quoted String into its platform specific form. The PlatformLineWriter is offering such a functionality, but it is obviously not that straightforward to use it. Therefore I propose to have a new method for the GDK String API that does what PlatformLineWriter does: gobbles any \r characters and replaces every \n with a platform specific newline.

        Activity

        Hans Dockter created issue -
        Paul King made changes -
        Field Original Value New Value
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Assignee Paul King [ paulk_asert ]
        Paul King made changes -
        Fix Version/s 1.6 [ 13832 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.5.8 [ 14630 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12731648 ] Default workflow, editable Closed status [ 12743467 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969639 ] Default workflow, editable Closed status [ 12977400 ]
        Mark Thomas made changes -
        Assignee paulk_asert [ paulk_asert ] Paul King [ paulk ]

          People

          • Assignee:
            Paul King
            Reporter:
            Hans Dockter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development