Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6346

new function (String): not all string-based conversions respect width and precision

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.5.0
    • Fix Version/s: PUP 4.5.3
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2016-07-13
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      some string conversions based on width and precision not honored when creating new strings

      Description

      Certain conversions to String using the new function respect width and precision of the format argument while some others do not.

      Examples:

      notice String(undef, '%.1p')
      notice String(undef, '%#.1p')
      notice String(default, '%.1p')
      notice String(true, '%.2s')
      notice String(true, '%.2y')
      

      This outputs:

      Notice: Scope(Class[main]): u
      Notice: Scope(Class[main]): "
      Notice: Scope(Class[main]): default
      Notice: Scope(Class[main]): true
      Notice: Scope(Class[main]): yes
      

      Expected output:

      Notice: Scope(Class[main]): u
      Notice: Scope(Class[main]): "
      Notice: Scope(Class[main]): d
      Notice: Scope(Class[main]): tr
      Notice: Scope(Class[main]): ye
      

      The width and precision in a format should be consistently respected.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  peter.huene Peter Huene
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: