Skip to content

[BUG] New clone of repo shows modification to pure2-regex_10_escapes.cpp.execution #1223

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

Closed
bluetarpmedia opened this issue Aug 13, 2024 · 5 comments · Fixed by #1224
Closed
Labels
bug Something isn't working

Comments

@bluetarpmedia
Copy link
Contributor

bluetarpmedia commented Aug 13, 2024

Tested on Windows 11 and Ubuntu 22.04:

A new, fresh clone of the cppfront repo shows a change to pure2-regex_10_escapes.cpp.execution.

Repro:

$ git clone https://github.com/hsutter/cppfront.git
$ cd cppfront
$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution

no changes added to commit (use "git add" and/or "git commit -a")

This message also appears in CI regarding the file:

warning: in the working copy of 'regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution', CRLF will be replaced by LF the next time Git touches it

However, I'm not convinced the problem is with the line endings because other .execution files appear to have CRLF endings.

Instead I'm wondering if there's something in the file itself which is causing a problem. The GitHub preview stops printing the line numbers after line 38:

image

I had a look in Notepad++ and it shows the \f Form Feed, \a Bell and \e Esc characters, so maybe that confuses the GitHub preview.

image

@bluetarpmedia bluetarpmedia added the bug Something isn't working label Aug 13, 2024
@bluetarpmedia bluetarpmedia changed the title [BUG] New clone of repo shows modification to pure2-regex_10_escapes.cpp.execution -- may have corrupt characters? [BUG] New clone of repo shows modification to pure2-regex_10_escapes.cpp.execution Aug 13, 2024
@MaxSagebaum
Copy link
Contributor

This regex tests if escapes for special characters are handled properly. The main problem is the automatic change of the line ending of github. I updated the result file now several times and also got a bug report via mail.

I think I should just simple remove this test.

@DyXel
Copy link
Contributor

DyXel commented Aug 13, 2024

For those tests you should probably not output what is being matched but rather if it was matched, and integer ranges.

@MaxSagebaum
Copy link
Contributor

I got the idea that I can just sanitize the outputs. I created a branch. #1224

@hsutter
Copy link
Owner

hsutter commented Aug 13, 2024

I've been having problems with this file too and I thought my local git was corrupt -- it would not let me discard the "changes" and as a workaround I had to re-commit the file, otherwise I couldn't even change branches.

Whew! It's just the file content, that's good news.

Yes if we could fix this that would be grand. 🙏

@MaxSagebaum
Copy link
Contributor

The bugfix branch is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants