Comments (4)
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 :)
from zunit.
@pawamoy it's not - I wasn't aware it was an issue. It should accept both so I'll look into a fix
from zunit.
Can confirm this also occurs on my own tests when swapping '
for "
from zunit.
I think it's caused by this line:
Line 259 in e58c49a
You are using \'
to get the test name boundaries. When using double-quotes instead, the test name is empty, and then later at
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
_zunit_run_testfile:21: tests: assignment to invalid subscript range
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 []
really are regex characters ranges.
from zunit.
Related Issues (20)
- Feature request: option to copy stderr of run statements to another file / file descriptor HOT 6
- Completely missing steps in setup
- Other installation methods HOT 3
- 'Assertion world does not exist' is not empty HOT 5
- A general question HOT 4
- Better error handling or debug/verbose behavior, please?
- Files in tests directory should be ignored when they lack a .zunit extension
- The homebrew statement "bottle :unneeded" is deprecated and needs to be removed
- [feature] Shell completion HOT 1
- [feature] Support codecov
- Provide a way to run a specific set of test(s) HOT 2
- Add option to run tests asynchronously HOT 1
- Make init --travis idempotent HOT 1
- Better documentation HOT 2
- "Missing required dependency" - Potential Regression in zunit 0.8.2? HOT 4
- Enable config environment variables over .zunit.yml HOT 1
- Unable to get --time-limit option to work (via cli or .yml) HOT 1
- Coding style – uses forks? HOT 6
- Provide option to output JUnit XML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zunit.