Giter Club home page Giter Club logo

Comments (5)

dungpa avatar dungpa commented on July 19, 2024

Why does this happen?

I develop on a Windows machine with VS 2012 installed but I don't observe the behaviour.

from fantomas.

ovatsus avatar ovatsus commented on July 19, 2024

Maybe it's because git is storing line endings just with \n and when you checkout it converts back. I had downloaded a zip file with the code from github. It would be nice o be resilient to that. Does it work in your scenario after my changes? I remember in FSharp.Data we also had to do some normalization in some unit tests that read expected output files from the file system


From: Anh-Dung Phanmailto:[email protected]
Sent: ‎03/‎07/‎2013 18:22
To: dungpa/fantomasmailto:[email protected]
Cc: Gustavo Guerramailto:[email protected]
Subject: Re: [fantomas] Unit Tests fail in windows (#55)

Why does this happen?

I develop on a Windows machine with VS 2012 installed but I don't observe the behaviour.


Reply to this email directly or view it on GitHub:
#55 (comment)

from fantomas.

dungpa avatar dungpa commented on July 19, 2024

No, it doesn't work on my machine.

In order to work with different line endings, we need to normalize expected strings as well. One way to fix is to override should equal, but it doesn't feel natural.

Maybe @forki knows how to fix this.

from fantomas.

ovatsus avatar ovatsus commented on July 19, 2024

When I got home and fetched from git it worked fine without my changes, and in fact my changes break it.
I did another commit to override the equal so it works in all scenarios. I know it's ugly, but that way it will work both when downloading the zip and to users that have the autocrlf git setting set to off.
Many times I can't use use git, so I just download the source from the github web site, and then after testing in VS do the changes directly on the github website as well, one file at the time

from fantomas.

dungpa avatar dungpa commented on July 19, 2024

Oh, I see it now.

The pull request looks good, merging now.

from fantomas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.