Haskeline test failed in GHC 9.4.5

DashiellWill dashiellwill at 163.com
Thu Nov 7 01:23:43 UTC 2024


Hi all,




I'm currently getting an error while testing the Haskeline library via `cabal test`.  (GHC version: 9.4.5, Platform: x86_64)

I get this:

        tests/RunTTY.hs:106

        expected: ["tests/dummy-\206\188\206\177\207\131/\r\n\207\130\206\181\207\129\207\132  bar\r\n0:tests/dummy-\206\188\206\177\207\131/"]

         but got: ["tests/dummy-\206\188\206\177\207\131/\r\nbar   \207\130\206\181\207\129\207\132\r\n0:tests/dummy-\206\188\206\177\207\131/"]

 

The specific test in question is related to tab completion. The test case is defined as follows:

        tabCompletion :: Invocation -> Test  

        tabCompletion i = "tab completion" ~:  

            [ utf8Test i [ utf8 "tests/dummy-μ\t\t" ]  

                [ prompt 0, utf8 "tests/dummy-μασ/"  

                    <> nl <> utf8 "ςερτ bar" <> nl  

                    <> prompt' 0 <> utf8 "tests/dummy-μασ/"  

                ]  

            ]

 

It seems that the functionality of the TabCompletion is correct, but the order of the displayed files

after tab completion does not match the expected output. 

Then, I ran the `haskeline-examples-Test` program directly and manually typed "tests/dummy-μ\t\t".

The results were indeed inconsistent with the expected output:

        0:tests/dummy-μασ/

        bar ςερτ

        0:tests/dummy-μασ/

 

Could anyone shed some light on the potential cause of this issue?

Is there a problem with the expected value? For example,  there are variations in the expected output across different environments?

 

Thanks,

Dashiell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20241107/4d40cd5e/attachment.html>


More information about the ghc-devs mailing list