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

Allow optional space in shebang #77

Merged
merged 1 commit into from
Jul 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/run.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function _zunit_parse_argument() {
line=$(cat $argument | head -n 1)

# Check for the zunit shebang
if [[ $line = "#!/usr/bin/env zunit" ]]; then
if [[ $line =~ "#! ?/usr/bin/env zunit" ]]; then
# Add it to the array
testfiles[(( ${#testfiles} + 1 ))]=("$argument${test_name+"@$test_name"}")
return
Expand Down
2 changes: 1 addition & 1 deletion tests/assertions/exists.zunit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env zunit
#! /usr/bin/env zunit

@test 'Test _zunit_assert_exists success' {
run assert './exists.zunit' exists
Expand Down