-
Notifications
You must be signed in to change notification settings - Fork 22
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
_zunit_run_testfile:21: tests: assignment to invalid subscript range #100
Comments
OK, seems to be because I used double-quotes for my test name instead of single-quotes. Is it mentioned in the README/docs? I'm actually giving a try at zunit by migrating bats tests :) |
@pawamoy it's not - I wasn't aware it was an issue. It should accept both so I'll look into a fix |
Can confirm this also occurs on my own tests when swapping |
I think it's caused by this line: Line 259 in e58c49a
You are using Line 271 in e58c49a
...you are trying to assign a value at index 0, when arrays start at 1 in Zsh, hence the error we get
Maybe a simple fix would be to use -testname="${line[(( ${line[(i)[\']]}+1 )),(( ${line[(I)[\']]}-1 ))]}"
+testname="${line[(( ${line[(i)[\'\"]]}+1 )),(( ${line[(I)[\'\"]]}-1 ))]}" instead? Not sure about the escaping, or if |
The text was updated successfully, but these errors were encountered: