Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

unicode string representation #27

Open

Description

@thautwarm

concerned issues

purescript/purescript#3662

#21 (comment)

@Hong-Xiang when you have time, please give some comments about codeUnits issues which occurred while you was writing tests for purescript-quickcheck.

Activity

  1. Hong-Xiang commented on Jun 19, 2020

    @Hong-Xiang
    Contributor

    I suggest checking unit tests for purescript-strings may be more clear for codePoints issues, it seems codeUnits passed tests.

    Related code

    The error happens in runnning import Test.Data.String.CodePoints (testStringCodePoints), which locates here in original purescript-strings repo.

    Details about test case

    in test case, the test string is defined as

    str :: String
    str = "a\xDC00\xD800\xD800\x16805\x16A06z"
    

    and tests is accessing it by index, with native python's str implemetation, when accessing it with index 1 as the following test case

    import Data.String.CodePoints as SCP
    
    assertEqual
        { actual: map show (SCP.codePointAt 1 str)
        , expected: Just "(CodePoint 0xDC00)"
        }
    

    The results is

    Exception: Expected: (Just "(CodePoint 0xDC00)")
    Actual:   (Just "(CodePoint 0xFFFD)")
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions