aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-07-31 15:54:03 -0500
committerJack Nagel2014-07-31 15:58:03 -0500
commit4a3c594358122b0c558de25d20041773d4b5cced (patch)
tree7821cc80135e7e1cba8356106d6f5bb6fb8f66e8 /Library/Homebrew/test
parent41a972726cb34be68b0c995f372df083b2f7453c (diff)
downloadhomebrew-4a3c594358122b0c558de25d20041773d4b5cced.tar.bz2
Handle tap file renames that remove a file from the formula directory
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/fixtures/updater_fixture.yaml3
-rw-r--r--Library/Homebrew/test/test_updater.rb11
2 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/fixtures/updater_fixture.yaml b/Library/Homebrew/test/fixtures/updater_fixture.yaml
index 6038623e6..b12f9d447 100644
--- a/Library/Homebrew/test/fixtures/updater_fixture.yaml
+++ b/Library/Homebrew/test/fixtures/updater_fixture.yaml
@@ -43,6 +43,9 @@ update_git_diff_output_with_changed_filetype: |
update_git_diff_output_with_restructured_tap: |
R100 git.rb Formula/git.rb
R100 lua.rb Formula/lua.rb
+update_git_diff_simulate_homebrew_php_restructuring: |
+ R100 Formula/git.rb Abstract/git.rb
+ R100 Formula/lua.rb Abstract/lua.rb
update_git_diff_output_with_tap_formulae_changes: |
M Rakefile
M README.md
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index b08766ae2..41824ebde 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -98,6 +98,17 @@ class UpdaterTests < Homebrew::TestCase
perform_update("update_git_diff_output_with_restructured_tap")
assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:A)
+ assert_empty @report.select_formula(:D)
+ end
+
+ def test_update_homebrew_simulate_homebrew_php_restructuring
+ repo = HOMEBREW_LIBRARY.join("Taps", "foo", "bar")
+ @updater = UpdaterMock.new(repo)
+ repo.join("Formula").mkpath
+
+ perform_update("update_git_diff_simulate_homebrew_php_restructuring")
+
+ assert_empty @report.select_formula(:A)
assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:D)
end