From c46155aba48b1b4ee99aa9d9fb1e0067e899e1e1 Mon Sep 17 00:00:00 2001 From: Josh Hagins Date: Sun, 9 Oct 2016 19:43:55 -0400 Subject: keg_relocate: cache files rewritten during brew bottle `brew bottle` replaces instances of the Homebrew prefix, cellar, and repository with placeholders in all text files. Cache these files in INSTALL_RECEIPT.json so that we don't have to check every single text file for placeholders on install. --- Library/Homebrew/test/test_tab.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/test/test_tab.rb') diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/test_tab.rb index 93c88d64b..3db7bbea1 100644 --- a/Library/Homebrew/test/test_tab.rb +++ b/Library/Homebrew/test/test_tab.rb @@ -11,6 +11,7 @@ class TabTests < Homebrew::TestCase "unused_options" => @unused.as_flags, "built_as_bottle" => false, "poured_from_bottle" => true, + "changed_files" => [], "time" => nil, "source_modified_time" => 0, "HEAD" => TEST_SHA1, @@ -33,6 +34,7 @@ class TabTests < Homebrew::TestCase tab = Tab.empty assert_empty tab.unused_options assert_empty tab.used_options + assert_empty tab.changed_files refute_predicate tab, :built_as_bottle refute_predicate tab, :poured_from_bottle assert_predicate tab, :stable? @@ -105,9 +107,11 @@ class TabTests < Homebrew::TestCase tab = Tab.from_file(path) source_path = "/usr/local/Library/Taps/hombrew/homebrew-core/Formula/foo.rb" runtime_dependencies = [{ "full_name" => "foo", "version" => "1.0" }] + changed_files = %w[INSTALL_RECEIPT.json bin/foo] assert_equal @used.sort, tab.used_options.sort assert_equal @unused.sort, tab.unused_options.sort + assert_equal changed_files, tab.changed_files refute_predicate tab, :built_as_bottle assert_predicate tab, :poured_from_bottle assert_predicate tab, :stable? @@ -187,6 +191,7 @@ class TabTests < Homebrew::TestCase assert_equal @tab.unused_options.sort, tab.unused_options.sort assert_equal @tab.built_as_bottle, tab.built_as_bottle assert_equal @tab.poured_from_bottle, tab.poured_from_bottle + assert_equal @tab.changed_files, tab.changed_files assert_equal @tab.tap, tab.tap assert_equal @tab.spec, tab.spec assert_equal @tab.time, tab.time -- cgit v1.2.3