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

Fix test failures (can't find executable; CRLF) #29

Merged
merged 1 commit into from
Oct 21, 2019

Conversation

cxw42
Copy link
Member

@cxw42 cxw42 commented Aug 4, 2019

As requested by @xuhdev - working on fixing #28. See details at #28 (comment) .

@editorconfig/developers Please see "Requirements on cores," below.

Overview

  • Permits CRLF in multiline tests, so that they pass on Windows
  • Updates backslash handling in the tests so they can pass on Windows and Unix (e.g., fixes this warning)

Requirements on cores

  • If your project's CMakeLists.txt builds the EditorConfig core executable, change EDITORCONFIG_CMD to =<target name> rather than a path to the executable. That will cause the tests to get the executable's name from cmake. See, e.g., this example.

Corresponding PRs I have been using to test these changes

These are currently draft, and I will submit them formally once this PR is merged.

  • Fixes a backslash-escaping warning that was, e.g.,

@xuhdev
Copy link
Member

xuhdev commented Oct 3, 2019

Any update :)

@cxw42
Copy link
Member Author

cxw42 commented Oct 4, 2019

Not currently - do you have any thoughts or other test cases? I'll work on it as soon as I can. I have been following some of the notifications in other repos and I know this needs to be taken care of.

Copy link
Member

@xuhdev xuhdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! This is really nice. I have posted some questions.

CMakeLists.txt Outdated Show resolved Hide resolved
filetree/CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
filetree/CMakeLists.txt Show resolved Hide resolved
filetree/CMakeLists.txt Show resolved Hide resolved
glob/CMakeLists.txt Show resolved Hide resolved
@cxw42
Copy link
Member Author

cxw42 commented Oct 20, 2019

@xuhdev Updated per your comments, and CI tests pass on the linked PRs :) .

Copy link
Member

@xuhdev xuhdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the PR LGTM except my last question as commented. Cheer for the hard work!

CMakeLists.txt Outdated Show resolved Hide resolved
Fixes:
- editorconfig#28
- The warning at https://ci.appveyor.com/project/xuhdev/editorconfig-core-c/builds/28235086/job/u9ebs7f3b9u3gowk#L1660

Major changes:
- Always use add_test(NAME ... COMMAND ...):
  This is for consistency - add_test(NAME ... COMMAND ...)
  escapes differently than add_test(<name> <command>...).
- Fix backslash escaping:
  Now that we are using the add_test(NAME ... COMMAND ...) form,
  backslash escaping works differently.  In my tests, backslashes
  are not collapsed in that form.
- Specify `-C Debug` on the `ctest` command line:
  This permits the Visual Studio generator to run tests.
@cxw42
Copy link
Member Author

cxw42 commented Oct 21, 2019

Related PRs have passed CI tests. Thank you for your kind words!

@xuhdev xuhdev merged commit 48610d4 into editorconfig:master Oct 21, 2019
@xuhdev
Copy link
Member

xuhdev commented Oct 21, 2019

Merged. Very cool. Thanks!

@greut
Copy link
Member

greut commented Oct 21, 2019

@xuhdev any plan to tag a new release?

@xuhdev
Copy link
Member

xuhdev commented Oct 21, 2019

@greut editorconfig/editorconfig#395 I think it's time to formulate a voting about versioning scheme. After that, we should be able to start tagging, along with the spec.

@cxw42 cxw42 deleted the cxwtest branch October 22, 2019 01:02
@cxw42 cxw42 mentioned this pull request Oct 22, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants