[Github-comments] [geany/geany] "make check" unittests fail on Windows (#2677)
Enrico Tröger
notifications at xxxxx
Wed Dec 2 22:22:43 UTC 2020
I still think reading the source files is not the problem. Tag parsing works fine on Windows, for LF and CRLF source files.
Anyway, I added some code in https://github.com/geany/geany/blob/c5303c9499bb6f0d632e0ca5b42e15f84d64ac52/ctags/main/read.c#L845 to print the return value of `mio_gets()`.
The source file content I used for testing, saved with CRLF line endings:
static void test_function(char *const str)
{
printf("%s", str);
}
The hex representation of the `mio_gets()` result after the file is *opened from disk* (spaces and line breaks added by me):
73 74 61 74 69 63 20 76 6f 69 64 20 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 28 63 68 61 72 20 2a 63 6f 6e 73 74 20 73 74 72 29 0d 0a
7b 0d 0a
09 70 72 69 6e 74 66 28 22 25 73 22 2c 20 73 74 72 29 3b 0d 0a
7d 0d 0a
The hex representation of the `mio_gets()` result after the file was edited in Geany (spaces and line breaks added by me):
73 74 61 74 69 63 20 76 6f 69 64 20 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 28 63 68 61 72 20 2a 63 6f 6e 73 74 20 73 74 72 29 0d 0a
7b 0d 0a
09 70 72 69 6e 74 66 28 22 25 73 22 2c 20 73 74 72 29 3b 0d 0a
7d 0d 0a
As you can see, the read lines contain the CRLFs.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2677#issuecomment-737531575
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20201202/dce66806/attachment.htm>
More information about the Github-comments
mailing list