Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing regression in 0.4.2 #5

Open
picca opened this issue Sep 14, 2023 · 0 comments
Open

parsing regression in 0.4.2 #5

picca opened this issue Sep 14, 2023 · 0 comments

Comments

@picca
Copy link

picca commented Sep 14, 2023

Hello, Ini used to parse correctly this kind of ini file. (look at the comment after the last active key/value.

    it "File With Comment" $ do
      (shouldBe
       (parseIni
         "[TEST]\n\
         \Key=value\n\
         \#comment\n")
        (Right
          (Ini
            { iniSections =
                fromList
                [ ( "TEST"
                  , [ ("Key", "value") ])
                ]
            , iniGlobals = []
            })))

now it fails with

Failures:

  test/BinocularsSpec.hs:73:8: 
  1) Binoculars, parse ini file, File With Comment
       expected: Right (Ini {iniSections = fromList [("TEST",[("Key","value")])], iniGlobals = []})
        but got: Left "Failed reading: #comment"

  To rerun use: --match "/Binoculars/parse ini file/File With Comment/"

If I remove the comment it parse it correctly.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant