Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
3f7fffe1
Commit
3f7fffe1
authored
8 years ago
by
Andrea Kao
Committed by
Mike McQuaid
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tests: extend cmd/log integration test (#333)
parent
e9cc2a5d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/test/test_integration_cmds.rb
+32
-0
32 additions, 0 deletions
Library/Homebrew/test/test_integration_cmds.rb
with
32 additions
and
0 deletions
Library/Homebrew/test/test_integration_cmds.rb
+
32
−
0
View file @
3f7fffe1
...
...
@@ -700,6 +700,38 @@ class IntegrationCommandTests < Homebrew::TestCase
(
HOMEBREW_REPOSITORY
/
".git"
).
rmtree
end
def
test_log_formula
core_tap
=
CoreTap
.
new
formula_file
=
core_tap
.
formula_dir
/
"testball.rb"
formula_file
.
write
<<-
EOS
.
undent
class Testball < Formula
url "https://example.com/testball-0.1.tar.gz"
end
EOS
core_tap
.
path
.
cd
do
shutup
do
system
"git"
,
"init"
system
"git"
,
"add"
,
"--all"
system
"git"
,
"commit"
,
"-m"
,
"This is a test commit for Testball"
end
end
homebrew_core_clone
=
Pathname
.
new
core_tap
.
path
.
dirname
/
"homebrew-core-clone"
shallow
=
Pathname
.
new
homebrew_core_clone
/
".git/shallow"
(
core_tap
.
path
.
dirname
).
cd
do
system
"git"
,
"clone"
,
"--depth=1"
,
"file://
#{
core_tap
.
path
}
"
,
"homebrew-core-clone"
assert_match
"This is a test commit for Testball"
,
cmd
(
"log"
,
"testball"
)
assert_predicate
shallow
,
:exist?
,
"A shallow clone should have been created."
end
ensure
formula_file
.
unlink
(
core_tap
.
path
/
".git"
).
rmtree
(
core_tap
.
path
.
dirname
/
"homebrew-core-clone"
).
rmtree
end
def
test_leaves
formula_dir
=
CoreTap
.
new
.
formula_dir
formula_file1
=
formula_dir
/
"testball1.rb"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment