Giter Club home page Giter Club logo

Comments (12)

cxw42 avatar cxw42 commented on August 23, 2024 2

An example of the backslash problem - with cmake 3.14.5, on Cygwin, CMake generates the test differently for the C core than for the Vim plugin+core (!) (scroll right):

editorconfig-vim/tests/core/build/tests/filetree/CTestTestfile.cmake
36:add_test(path_separator_backslash_in_cmd_line "/home/cxw/proj/editorconfig-vim/tests/core/editorconfig" "-f" "path_separator.in" "/home/cxw/proj/editorconfig-vim/tests/core/tests/filetree\\path\\separator")
                                                                                                                                                                                              ^^ two backslashes
37:set_tests_properties(path_separator_backslash_in_cmd_line PROPERTIES  PASS_REGULAR_EXPRESSION "^[

editorconfig-core-c/build/tests/filetree/CTestTestfile.cmake
36:add_test(path_separator_backslash_in_cmd_line "/home/cxw/proj/editorconfig-core-c/build/bin/editorconfig.exe" "-f" "path_separator.in" "/home/cxw/proj/editorconfig-core-c/tests/filetree\\\\path\\\\separator")
                                                                                                                                                                                            ^^^^ four backslashes
37:set_tests_properties(path_separator_backslash_in_cmd_line PROPERTIES  PASS_REGULAR_EXPRESSION "^[
(END)

I am going to try generating the path string by concatenating strings with fixed ASCII values and see what happens.

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024 1

@cxw42 #9 is likely a different issue, but this issue seems more urgent (CMake starts to fail on Windows after this commit)

from editorconfig-core-test.

cxw42 avatar cxw42 commented on August 23, 2024

@xuhdev I see this is on the test-windows branch. What is the purpose of this branch? I'd like to know what the end goal is.

Both of the links you sent show as failures when I look at them -

I see the tab_width_default_ML failure in the second, but I don't see that test in the first at all.

Would you please double-check and let me know if those are the correct builds to look at? Thanks!

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024

@cxw42 Because tab_width_default_ML was renamed from tab_width_default in 3d439da -- The first one succeeded but the second one failed. These two links correspond to two PRs:

Now it looks like the first link also failed one multiline test (which I did not notice before), but the second failed a lot of them.

from editorconfig-core-test.

cxw42 avatar cxw42 commented on August 23, 2024

Thanks for the extra info. Is the test-windows branch just updating editorconfig-core-c to the latest tests?

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024

@cxw42 No, the master has the latest test code. test-windows is a branch used in one of the above PRs.

from editorconfig-core-test.

cxw42 avatar cxw42 commented on August 23, 2024

@xuhdev Would you please assign this to me? Thanks!

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024

@cxw42 Done. Would like to be a developer of EditorConfig? I can add you in the Developer Team.

from editorconfig-core-test.

cxw42 avatar cxw42 commented on August 23, 2024

@xuhdev Thank you for asking! I would be honored.

This problem seems to be related to the path to editorconfig.exe in some tests - it is in build\bin and core\bin\Release, but the meta test is looking in core\bin (example). I will see if I can figure out why.

from editorconfig-core-test.

cxw42 avatar cxw42 commented on August 23, 2024

@xuhdev I have a proposed fix at https://github.com/cxw42/editorconfig-core-test/tree/cxwtest . It is not ready for a PR yet. However, would you be willing to try it out with a few cores and see what you find?

In the C core and core tests, I had to change the way EDITORCONFIG_CMD works in order to handle Debug vs. Release builds. In the new tests, =foo tells the core tests to use the result of CMake target foo as the editorconfig executable. Any name not starting with = has the old behaviour. I then use that = to switch to the COMMAND mode of add_test(), in which CMake itself figures out the executable name. The C core now uses the '=' form (https://github.com/cxw42/editorconfig-core-c/tree/cxwtest).

I also had to change the backslash escaping in the filetree test path_separator_backslash_in_cmd_line_regex. Edit That at least needs some sort of fixing (see here), but I am not completely sure yet what the right fix should be.

If you have any questions or comments, please let me know. Otherwise, I will clean up the repos in question and submit PRs (core-test first, then core-c).

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024

@cxw42 Sure. Could you send a WIP PR? We can look at the changes together there and it's probably easier.

from editorconfig-core-test.

xuhdev avatar xuhdev commented on August 23, 2024

Fixed by 48610d4

from editorconfig-core-test.

Related Issues (19)

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.