mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix spelling
This commit is contained in:
parent
fac7ff41d8
commit
1691e615fe
@ -317,7 +317,7 @@ module Homebrew
|
||||
next
|
||||
end
|
||||
|
||||
# If we've specifed --prune don't do the (expensive) .stale? check.
|
||||
# If we've specified --prune don't do the (expensive) .stale? check.
|
||||
cleanup_path(path) { path.unlink } if !prune? && path.stale?(scrub: scrub?)
|
||||
end
|
||||
|
||||
|
@ -46,7 +46,7 @@ module Homebrew
|
||||
prefixes = formulae.map do |f|
|
||||
next nil if args.installed? && !f.opt_prefix.exist?
|
||||
|
||||
# this case wil be short-circuited by brew.sh logic for a single formula
|
||||
# this case will be short-circuited by brew.sh logic for a single formula
|
||||
f.opt_prefix
|
||||
end.compact
|
||||
puts prefixes
|
||||
|
@ -108,7 +108,7 @@ module Homebrew
|
||||
|
||||
ohai "Homebrew completions for external commands are unlinked by default!"
|
||||
puts <<~EOS
|
||||
To opt-in to automatically linking external tap shell competion files, run:
|
||||
To opt-in to automatically linking external tap shell completion files, run:
|
||||
brew completions link
|
||||
Then, follow the directions at #{Formatter.url("https://docs.brew.sh/Shell-Completion")}
|
||||
EOS
|
||||
|
@ -118,7 +118,7 @@ module OS
|
||||
def sdk_for_formula(f, v = nil, check_only_runtime_requirements: false)
|
||||
# If the formula requires Xcode, don't return the CLT SDK
|
||||
# If check_only_runtime_requirements is true, don't necessarily return the
|
||||
# Xcode SDK if the XcodeRequirement is only a build or test requirment.
|
||||
# Xcode SDK if the XcodeRequirement is only a build or test requirement.
|
||||
return Xcode.sdk if f.requirements.any? do |req|
|
||||
next false unless req.is_a? XcodeRequirement
|
||||
next false if check_only_runtime_requirements && req.build? && !req.test?
|
||||
|
@ -375,14 +375,14 @@ describe Homebrew::CLI::Parser do
|
||||
expect(parser.generate_help_text).to match(/This command does something/)
|
||||
end
|
||||
|
||||
it "allows the usage banner to be overriden" do
|
||||
it "allows the usage banner to be overridden" do
|
||||
parser = described_class.new do
|
||||
usage_banner "`test` [foo] <bar>"
|
||||
end
|
||||
expect(parser.generate_help_text).to match(/test \[foo\] bar/)
|
||||
end
|
||||
|
||||
it "allows a usage banner and a description to be overriden" do
|
||||
it "allows a usage banner and a description to be overridden" do
|
||||
parser = described_class.new do
|
||||
usage_banner "`test` [foo] <bar>"
|
||||
description <<~EOS
|
||||
|
@ -66,7 +66,7 @@ describe GitHub do
|
||||
end
|
||||
|
||||
describe "::get_artifact_url", :needs_network do
|
||||
it "fails to find a nonexistant workflow" do
|
||||
it "fails to find a nonexistent workflow" do
|
||||
expect {
|
||||
described_class.get_artifact_url(
|
||||
described_class.get_workflow_run("Homebrew", "homebrew-core", 1),
|
||||
|
@ -93,7 +93,7 @@ describe PyPI do
|
||||
expect(package_with_version.pypi_info).to eq ["snakemake", old_package_url, old_package_checksum, "5.28.0"]
|
||||
end
|
||||
|
||||
it "gets pypi info from a package name with overriden version" do
|
||||
it "gets pypi info from a package name with overridden version" do
|
||||
expected_result = ["snakemake", package_url, package_checksum, "5.29.0"]
|
||||
expect(package_with_version.pypi_info(version: "5.29.0")).to eq expected_result
|
||||
end
|
||||
@ -107,7 +107,7 @@ describe PyPI do
|
||||
expect(package_from_url.pypi_info).to eq ["snakemake", package_url, package_checksum, "5.29.0"]
|
||||
end
|
||||
|
||||
it "gets pypi info from a url with overriden version" do
|
||||
it "gets pypi info from a url with overridden version" do
|
||||
expected_result = ["snakemake", old_package_url, old_package_checksum, "5.28.0"]
|
||||
expect(package_from_url.pypi_info(version: "5.28.0")).to eq expected_result
|
||||
end
|
||||
|
@ -77,7 +77,7 @@ describe SPDX do
|
||||
expect(described_class.parse_license_expression(license_expression)).to eq [["MIT"], ["LLVM-exception"]]
|
||||
end
|
||||
|
||||
it "returns licenses and exceptions for compex license expressions" do
|
||||
it "returns licenses and exceptions for complex license expressions" do
|
||||
license_expression = { any_of: [
|
||||
"MIT",
|
||||
:public_domain,
|
||||
@ -197,7 +197,7 @@ describe SPDX do
|
||||
expect(described_class.license_expression_to_string(license_expression)).to eq "MIT with LLVM-exception"
|
||||
end
|
||||
|
||||
it "returns licenses and exceptions for compex license expressions" do
|
||||
it "returns licenses and exceptions for complex license expressions" do
|
||||
license_expression = { any_of: [
|
||||
"MIT",
|
||||
:public_domain,
|
||||
|
@ -289,7 +289,7 @@ Some advice for specific cases:
|
||||
* If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
|
||||
A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
|
||||
* If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
|
||||
* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is prefered over mocking a dependency.
|
||||
* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is preferred over mocking a dependency.
|
||||
* Homebrew comes with a number of [standard test fixtures](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/test/support/fixtures), including numerous sample images, sounds, and documents in various formats. You can get the file path to a test fixture with `test_fixtures("test.svg")`.
|
||||
* If your test requires a test file that isn't a standard test fixture, you can install it from a source repository during the `test` phase with a resource block, like this:
|
||||
|
||||
@ -631,7 +631,7 @@ If you need more control over the way files are downloaded and staged, you can c
|
||||
class MyDownloadStrategy < SomeHomebrewDownloadStrategy
|
||||
def fetch(timeout: nil, **options)
|
||||
opoo "Unhandled options in #{self.class}#fetch: #{options.keys.join(", ")}" unless options.empty?
|
||||
|
||||
|
||||
# downloads output to `temporary_path`
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user