-
Notifications
You must be signed in to change notification settings - Fork 90
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
Support array indexing by range II #634
Support array indexing by range II #634
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should remove these tests, as they don't break our CI. Plus, they will be useful when we decide to fix the issue.
Maybe instead of removing them altogether, you can extract them into separate files.
I can certainly do that, but I think I also need to skip the tests in those files if the Bash version is not high enough. See this Discord discussion about the various options. |
I've pushed a new commit, to split the failing tests into ones for positive and negative integers, and made the negative tests succeed on earlier Bash versions. This requires a change to the test framework, where we pass automatically if the output is "Succeeded", even in the presence of an expected output comment. |
@hdwalters there are conflicts |
According to https://mywiki.wooledge.org/BashFAQ/061, this functionality was introduced in Bash 4.2. I will adjust the workaround in the test scripts. |
0d97818
to
b71bda7
Compare
I've fixed the merge conflicts, and enabled the negative index tests for Bash 4.2 and above; I would be grateful for another review please. |
e11415f
to
531213a
Compare
531213a
to
df64db3
Compare
there is a test failing |
That's nothing to do with my changes. Looks like a Heisenbug to me. |
I reran the tests, and they worked the second time. So I think it's a Heisenbug, given that the tests were failing in a completely different area to my changes (in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hdwalters, this looks good!
Remove failing negative index validity tests.