Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue:
When running the test script in
scripts/test
on Windows some tests failed because of some paths. The two paths are:runtime-error.ls
, there is a carriage return (\r
) before the\n
, and the path is absolute with\
(in th script it's.*/test/data/runtime-error.ls
)data.json.ls
, the output oflsc -c --debug test/data/data.json.ls
used\
on windowsdata.ls
Fix:
All the regex are in
test/cli.ls
.runtime-error.ls
regex is fixed by adding a check on the new line mess ([\r\n]{1,2}
) and the absolute path is abstracted. The code still checks if it'sruntime-error.ls
that is throwing the error, and if it's line 2, char 17.data.json.ls
anddata.ls
the path is now normalized.NOTE: I haven't any linux on hand to check if the new regex and normalize will fail on it. If someone can check on it, it would be great. I'll try tomorrow to run it on linux, but another pair of eyes is better than one ;-)