-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
bats-core 0.4.0 (new formula) #20073
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
class BatsCore < Formula | ||
desc "Bash Automated Testing System" | ||
homepage "https://github.com/bats-core/bats-core" | ||
url "https://github.com/bats-core/bats-core/archive/v0.4.0.tar.gz" | ||
sha256 "e3b65b50a26e3f0c33b5d0a57d74101acf096e39473294d4840635ca6206fec7" | ||
|
||
bottle :unneeded | ||
|
||
def install | ||
system "./install.sh", prefix | ||
end | ||
|
||
def caveats; <<~EOS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't usually like long There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As an example: conflicts_with "bats", :because => "both install a `bats` binary" |
||
bats: bash automated testing system | ||
bats-core is the continuation of the original bats project. | ||
|
||
IF YOU ALREADY HAVE BATS INSTALLED: | ||
This version of bats is 0.4.0 via bats-core. | ||
|
||
All versions up to and including 0.4.0 are identical mirrors through | ||
both bats and bats-core. | ||
|
||
However, to complete installation you may need to unlink, remove, | ||
or overwrite your older bats installation. | ||
|
||
To unlink: | ||
brew unlink bats && brew link bats-core | ||
|
||
To overwrite: | ||
brew link --overwrite bats-core | ||
|
||
To remove: | ||
brew remove bats && brew link bats-core | ||
|
||
For questions/issues: https://github.com/bats-core/bats-core/issues | ||
More information can be found at: https://github.com/bats-core/bats-core | ||
EOS | ||
end | ||
|
||
test do | ||
(testpath/"testing.sh").write <<~EOS | ||
#!/usr/bin/env bats | ||
@test "addition using bc" { | ||
result="$(echo 2+2 | bc)" | ||
[ "$result" -eq 4 ] | ||
} | ||
EOS | ||
|
||
chmod 0755, testpath/"testing.sh" | ||
assert_match "addition", shell_output("./testing.sh") | ||
end | ||
end |
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.
You can drop this line -- we prefer to build bottles of shell-only packages.
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.
(Or maybe not...I see that we allowed for
:unneeded
in the originalbats
.)