editorconfig / editorconfig-plugin-tests

Tests for EditorConfig plugins
Creative Commons Attribution 4.0 International
16 stars 8 forks source link

Create acceptance tests #3

Open treyhunner opened 12 years ago

treyhunner commented 12 years ago

Create tests that combine multiple properties in particular ways.

These tests should be for scenarios that are:

  1. Common (many projects may use the set of properties tested)
  2. Potentially problematic (tests for clashes between particular properties)

Some planned acceptance tests:

  1. Visual Studio Setup:

    charset = utf-8-bom
    insert_final_newline = false
    end_of_line = crlf
  2. Linux Setup:

    charset = utf-8
    insert_final_newline = true
    end_of_line = lf
  3. Sublime Setup:

    charset = utf-8
    insert_final_newline = false
    end_of_line = lf
xuhdev commented 12 years ago

I don't think end_of_line is fixed for sublime on every OS...

I think maybe your Common means something like BSD style, ANSI style, etc.?

xuhdev commented 12 years ago

But not restricted to C coding styles.

xuhdev commented 12 years ago

See http://en.wikipedia.org/wiki/Indent_style

treyhunner commented 12 years ago

I haven't tried Sublime on Windows so I don't know whether it uses CRLF. We could add that as a use case also. The names I'm giving these are primarily just for the purpose of labeling common use cases. By common I don't necessarily mean named coding styles (BSD, ANSI, etc.) but coding styles that are frequently used by some large sample of users or projects.

xuhdev commented 12 years ago

Yes, I agree that we should deal with common styles more. But I think these named styles are in fact commonly used. In fact, our C core is using BSD style (or very similar to).

But I am not sure about the named styles of other languages... For example Python, I think the style is quite unified, but I am not sure.

xuhdev commented 12 years ago

I've added a Linux coding style at the template directory: b68005f02e51a22ae7063c968cf277a402d62246

If you think the location is inappropriate, we can change it then. But I think naming it template is good, because people can find the template they want there, for common coding styles.