diff options
| author | Josh Hagins | 2016-10-24 16:44:36 -0400 |
|---|---|---|
| committer | GitHub | 2016-10-24 16:44:36 -0400 |
| commit | 79e8cdd3ed8c7f5dee573648d55eb3d3e305de19 (patch) | |
| tree | 4228093e30d00c9568538342adf8ef10c55377cd /Library/Homebrew/test | |
| parent | e6bce5ec27306e85a8312400f44d8b9685f9e981 (diff) | |
| parent | fab2cffe5de82b6d540fcf3f4f8873f7cd89af34 (diff) | |
| download | brew-79e8cdd3ed8c7f5dee573648d55eb3d3e305de19.tar.bz2 | |
Merge pull request #1253 from jawshooah/perf/relocate-text-files
keg_relocate: cache files rewritten during brew bottle
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/fixtures/receipt.json | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_tab.rb | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/fixtures/receipt.json b/Library/Homebrew/test/fixtures/receipt.json index 62672bfa9..404251026 100644 --- a/Library/Homebrew/test/fixtures/receipt.json +++ b/Library/Homebrew/test/fixtures/receipt.json @@ -9,6 +9,10 @@ ], "built_as_bottle": false, "poured_from_bottle": true, + "changed_files": [ + "INSTALL_RECEIPT.json", + "bin/foo" + ], "time": 1403827774, "HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef", "alias_path": "/usr/local/Library/Taps/homebrew/homebrew-core/Aliases/test-formula", diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/test_tab.rb index 93c88d64b..2c756cf68 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_nil 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 |
