Giter VIP home page Giter VIP logo

Comments (13)

xuhdev avatar xuhdev commented on July 28, 2024

On Sunday, November 27, 2011, Trey Hunner <
[email protected]>
wrote:

I think we should add test cases for the EditorConfig core to ensure that
future changes maintain backwards compatibility and do not any break
current functionality.

It looks like cmake is bundled with a test suite called ctest. Maybe we
should use that.

I agree. I am now try to do this.

Hong

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

The general test mechanism has been implemented: aa726008d0f024cd7c89c43eec377fda22cb9df9

Now what we need to do is to add testing cases.

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

Maybe we should group our test cases into files of like tests. For example the current three test cases for question mark, asterisk, and square brackets could be grouped into one file called test_globs.in.

Here are some starter test file groups I propose:

  • test_globs.in: used for testing globbing functionality
  • test_properties.in: used for property-specific tests (such as lowercasing eol or setting default values)
  • test_ini.in: used for testing INI parsing edge cases and section parsing order
  • test_args.in: used for testing command line arguments (e.g. --version)

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

Would test_properties be very long in the future?

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

It may be. We could make a subdirectory called property_tests and add property-specific tests in individual files.

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

Maybe we could use 4 subdirectories for the four categories respectively.

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

That works for me.

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

I think we should remove the test_ prefix from the test directories and files because they are redundant. What do you think?

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

I agree.

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

test_ prefix removed. ee83a1241450b9002d683b2718232a083b46be14

from editorconfig.

xuhdev avatar xuhdev commented on July 28, 2024

According to your recent commit, it seems that you have forgotten that test_ should be removed.
Just a remind here.

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

Ah yes I had started making that file before we changed the naming scheme. Thanks for fixing.

from editorconfig.

treyhunner avatar treyhunner commented on July 28, 2024

The test coverage now seems reasonable to me. I'm closing this.

If we discover gaps in test case coverage in the future new issues should be made to handle them.

from editorconfig.

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.