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

Fixing test script for windows #1127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

othelarian
Copy link

The issue:

When running the test script in scripts/test on Windows some tests failed because of some paths. The two paths are:

  • for 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)
  • for data.json.ls, the output of lsc -c --debug test/data/data.json.ls used \ on windows
  • same for data.ls

Fix:

All the regex are in test/cli.ls.

  • The 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's runtime-error.ls that is throwing the error, and if it's line 2, char 17.
  • For data.json.ls and data.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 ;-)

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.

1 participant