From 4db1317f38f5a55574854e7bf1dfe4379e807b4f Mon Sep 17 00:00:00 2001
From: Markus Reiter
Date: Mon, 24 Oct 2016 22:53:25 +0200
Subject: Move all remaining fixtures to `test/support/fixtures`.
---
Library/Homebrew/cask/spec/spec_helper.rb | 6 +-
Library/Homebrew/cask/test/test_helper.rb | 6 +-
.../testball_bottle-0.1.el_capitan.bottle.tar.gz | 1 -
.../testball_bottle-0.1.linux_x86_64.bottle.tar.gz | 1 -
...stball_bottle-0.1.macintosh_intel.bottle.tar.gz | 1 -
.../testball_bottle-0.1.mavericks.bottle.tar.gz | 1 -
...testball_bottle-0.1.mountain_lion.bottle.tar.gz | 1 -
.../testball_bottle-0.1.sierra.bottle.tar.gz | 1 -
.../testball_bottle-0.1.yosemite.bottle.tar.gz | Bin 1379 -> 0 bytes
.../Homebrew/test/fixtures/cask/AppWithBinary.zip | Bin 306 -> 0 bytes
.../test/fixtures/cask/AppWithEmbeddedBinary.zip | Bin 618 -> 0 bytes
Library/Homebrew/test/fixtures/cask/MyFancyApp.zip | Bin 304 -> 0 bytes
Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip | Bin 532 -> 0 bytes
.../Homebrew/test/fixtures/cask/NestedApp.dmg.zip | Bin 2494 -> 0 bytes
.../Homebrew/test/fixtures/cask/caffeine-suite.zip | Bin 3170 -> 0 bytes
Library/Homebrew/test/fixtures/cask/caffeine.zip | Bin 1328 -> 0 bytes
.../test/fixtures/cask/caffeines-subdir.zip | Bin 3240 -> 0 bytes
Library/Homebrew/test/fixtures/cask/caffeines.zip | Bin 2796 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.7z | Bin 143 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.air | Bin 5934 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.bz2 | Bin 59 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.cab | Bin 95 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.dmg | Bin 25337 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.gz | Bin 47 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.lzma | Bin 41 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.pkg | Bin 516 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.rar | Bin 87 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.sit | Bin 236 -> 0 bytes
.../Homebrew/test/fixtures/cask/container.tar.gz | Bin 154 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.xar | Bin 4679 -> 0 bytes
Library/Homebrew/test/fixtures/cask/container.xz | Bin 76 -> 0 bytes
.../test/fixtures/cask/empty_directory/.gitignore | 0
.../Homebrew/test/fixtures/cask/naked_executable | 2 -
.../test/fixtures/cask/transmission-2.61.dmg | Bin 28490 -> 0 bytes
Library/Homebrew/test/fixtures/receipt.json | 37 ----
Library/Homebrew/test/fixtures/receipt_old.json | 17 --
Library/Homebrew/test/fixtures/test.diff | 10 --
Library/Homebrew/test/fixtures/test.eps | 25 ---
Library/Homebrew/test/fixtures/test.gif | Bin 43 -> 0 bytes
Library/Homebrew/test/fixtures/test.ico | Bin 1182 -> 0 bytes
Library/Homebrew/test/fixtures/test.jpg | Bin 288 -> 0 bytes
Library/Homebrew/test/fixtures/test.m4a | Bin 1689 -> 0 bytes
Library/Homebrew/test/fixtures/test.mp3 | Bin 360 -> 0 bytes
Library/Homebrew/test/fixtures/test.pcap | Bin 1415 -> 0 bytes
Library/Homebrew/test/fixtures/test.pdf | 24 ---
Library/Homebrew/test/fixtures/test.png | Bin 82 -> 0 bytes
Library/Homebrew/test/fixtures/test.ps | 6 -
Library/Homebrew/test/fixtures/test.svg | 4 -
Library/Homebrew/test/fixtures/test.tiff | Bin 3916 -> 0 bytes
Library/Homebrew/test/fixtures/test.wav | Bin 1070 -> 0 bytes
.../Homebrew/test/fixtures/updater_fixture.yaml | 64 -------
Library/Homebrew/test/helper/env.rb | 15 --
.../test/helper/integration_command_test_case.rb | 200 ---------------------
Library/Homebrew/test/helper/shutup.rb | 24 ---
Library/Homebrew/test/lib/config.rb | 40 -----
Library/Homebrew/test/lib/integration_mocks.rb | 17 --
Library/Homebrew/test/mach/a.out | Bin 25072 -> 0 bytes
Library/Homebrew/test/mach/fat.bundle | Bin 16472 -> 0 bytes
Library/Homebrew/test/mach/fat.dylib | Bin 16452 -> 0 bytes
Library/Homebrew/test/mach/i386.bundle | Bin 4168 -> 0 bytes
Library/Homebrew/test/mach/i386.dylib | Bin 4164 -> 0 bytes
Library/Homebrew/test/mach/x86_64.bundle | Bin 4184 -> 0 bytes
Library/Homebrew/test/mach/x86_64.dylib | Bin 4176 -> 0 bytes
Library/Homebrew/test/patches/noop-a.diff | 10 --
Library/Homebrew/test/patches/noop-b.diff | 10 --
Library/Homebrew/test/patches/noop-c.diff | 9 -
.../testball_bottle-0.1.el_capitan.bottle.tar.gz | 1 +
.../testball_bottle-0.1.linux_x86_64.bottle.tar.gz | 1 +
...stball_bottle-0.1.macintosh_intel.bottle.tar.gz | 1 +
.../testball_bottle-0.1.mavericks.bottle.tar.gz | 1 +
...testball_bottle-0.1.mountain_lion.bottle.tar.gz | 1 +
.../testball_bottle-0.1.sierra.bottle.tar.gz | 1 +
.../testball_bottle-0.1.yosemite.bottle.tar.gz | Bin 0 -> 1379 bytes
.../test/support/fixtures/cask/AppWithBinary.zip | Bin 0 -> 306 bytes
.../fixtures/cask/AppWithEmbeddedBinary.zip | Bin 0 -> 618 bytes
.../test/support/fixtures/cask/MyFancyApp.zip | Bin 0 -> 304 bytes
.../test/support/fixtures/cask/MyFancyPkg.zip | Bin 0 -> 532 bytes
.../test/support/fixtures/cask/NestedApp.dmg.zip | Bin 0 -> 2494 bytes
.../test/support/fixtures/cask/caffeine-suite.zip | Bin 0 -> 3170 bytes
.../test/support/fixtures/cask/caffeine.zip | Bin 0 -> 1328 bytes
.../support/fixtures/cask/caffeines-subdir.zip | Bin 0 -> 3240 bytes
.../test/support/fixtures/cask/caffeines.zip | Bin 0 -> 2796 bytes
.../test/support/fixtures/cask/container.7z | Bin 0 -> 143 bytes
.../test/support/fixtures/cask/container.air | Bin 0 -> 5934 bytes
.../test/support/fixtures/cask/container.bz2 | Bin 0 -> 59 bytes
.../test/support/fixtures/cask/container.cab | Bin 0 -> 95 bytes
.../test/support/fixtures/cask/container.dmg | Bin 0 -> 25337 bytes
.../test/support/fixtures/cask/container.gz | Bin 0 -> 47 bytes
.../test/support/fixtures/cask/container.lzma | Bin 0 -> 41 bytes
.../test/support/fixtures/cask/container.pkg | Bin 0 -> 516 bytes
.../test/support/fixtures/cask/container.rar | Bin 0 -> 87 bytes
.../test/support/fixtures/cask/container.sit | Bin 0 -> 236 bytes
.../test/support/fixtures/cask/container.tar.gz | Bin 0 -> 154 bytes
.../test/support/fixtures/cask/container.xar | Bin 0 -> 4679 bytes
.../test/support/fixtures/cask/container.xz | Bin 0 -> 76 bytes
.../fixtures/cask/empty_directory/.gitignore | 0
.../test/support/fixtures/cask/naked_executable | 2 +
.../support/fixtures/cask/transmission-2.61.dmg | Bin 0 -> 28490 bytes
Library/Homebrew/test/support/fixtures/mach/a.out | Bin 0 -> 25072 bytes
.../Homebrew/test/support/fixtures/mach/fat.bundle | Bin 0 -> 16472 bytes
.../Homebrew/test/support/fixtures/mach/fat.dylib | Bin 0 -> 16452 bytes
.../test/support/fixtures/mach/i386.bundle | Bin 0 -> 4168 bytes
.../Homebrew/test/support/fixtures/mach/i386.dylib | Bin 0 -> 4164 bytes
.../test/support/fixtures/mach/x86_64.bundle | Bin 0 -> 4184 bytes
.../test/support/fixtures/mach/x86_64.dylib | Bin 0 -> 4176 bytes
.../test/support/fixtures/patches/noop-a.diff | 10 ++
.../test/support/fixtures/patches/noop-b.diff | 10 ++
.../test/support/fixtures/patches/noop-c.diff | 9 +
.../Homebrew/test/support/fixtures/receipt.json | 37 ++++
.../test/support/fixtures/receipt_old.json | 17 ++
.../fixtures/tarballs/testball-0.1-patches.tgz | Bin 0 -> 368 bytes
.../support/fixtures/tarballs/testball-0.1.tbz | Bin 0 -> 1318 bytes
.../support/fixtures/tarballs/testbottest-0.1.tbz | Bin 0 -> 548 bytes
Library/Homebrew/test/support/fixtures/test.diff | 10 ++
Library/Homebrew/test/support/fixtures/test.eps | 25 +++
Library/Homebrew/test/support/fixtures/test.gif | Bin 0 -> 43 bytes
Library/Homebrew/test/support/fixtures/test.ico | Bin 0 -> 1182 bytes
Library/Homebrew/test/support/fixtures/test.jpg | Bin 0 -> 288 bytes
Library/Homebrew/test/support/fixtures/test.m4a | Bin 0 -> 1689 bytes
Library/Homebrew/test/support/fixtures/test.mp3 | Bin 0 -> 360 bytes
Library/Homebrew/test/support/fixtures/test.pcap | Bin 0 -> 1415 bytes
Library/Homebrew/test/support/fixtures/test.pdf | 24 +++
Library/Homebrew/test/support/fixtures/test.png | Bin 0 -> 82 bytes
Library/Homebrew/test/support/fixtures/test.ps | 6 +
Library/Homebrew/test/support/fixtures/test.svg | 4 +
Library/Homebrew/test/support/fixtures/test.tiff | Bin 0 -> 3916 bytes
Library/Homebrew/test/support/fixtures/test.wav | Bin 0 -> 1070 bytes
Library/Homebrew/test/support/fixtures/testball.rb | 15 ++
.../test/support/fixtures/testball_bottle.rb | 20 +++
.../Homebrew/test/support/fixtures/testbottest.rb | 14 ++
.../test/support/fixtures/updater_fixture.yaml | 64 +++++++
Library/Homebrew/test/support/helper/env.rb | 15 ++
.../helper/integration_command_test_case.rb | 200 +++++++++++++++++++++
Library/Homebrew/test/support/helper/shutup.rb | 24 +++
Library/Homebrew/test/support/lib/config.rb | 40 +++++
.../Homebrew/test/support/lib/integration_mocks.rb | 17 ++
.../test/tarballs/testball-0.1-patches.tgz | Bin 368 -> 0 bytes
Library/Homebrew/test/tarballs/testball-0.1.tbz | Bin 1318 -> 0 bytes
Library/Homebrew/test/tarballs/testbottest-0.1.tbz | Bin 548 -> 0 bytes
Library/Homebrew/test/test/ENV_test.rb | 3 +-
Library/Homebrew/test/test/analytics_test.rb | 3 +-
Library/Homebrew/test/test/bottle_test.rb | 3 +-
Library/Homebrew/test/test/bundle_test.rb | 3 +-
Library/Homebrew/test/test/cache_formula_test.rb | 3 +-
Library/Homebrew/test/test/cache_test.rb | 3 +-
Library/Homebrew/test/test/cask_test.rb | 3 +-
Library/Homebrew/test/test/cat_test.rb | 3 +-
Library/Homebrew/test/test/cellar_formula_test.rb | 3 +-
Library/Homebrew/test/test/cellar_test.rb | 3 +-
.../test/test/checksum_verification_test.rb | 2 +-
Library/Homebrew/test/test/cleaner_test.rb | 4 +-
Library/Homebrew/test/test/cleanup_test.rb | 5 +-
Library/Homebrew/test/test/command_test.rb | 3 +-
Library/Homebrew/test/test/commands_test.rb | 3 +-
Library/Homebrew/test/test/config_test.rb | 3 +-
Library/Homebrew/test/test/create_test.rb | 5 +-
Library/Homebrew/test/test/custom_command_test.rb | 3 +-
Library/Homebrew/test/test/deps_test.rb | 3 +-
Library/Homebrew/test/test/desc_test.rb | 3 +-
Library/Homebrew/test/test/doctor_test.rb | 3 +-
Library/Homebrew/test/test/edit_test.rb | 3 +-
Library/Homebrew/test/test/fetch_test.rb | 3 +-
.../test/test/formula_installer_bottle_test.rb | 4 +-
.../Homebrew/test/test/formula_installer_test.rb | 4 +-
Library/Homebrew/test/test/formula_test.rb | 2 +-
Library/Homebrew/test/test/formulary_test.rb | 4 +-
Library/Homebrew/test/test/help_test.rb | 3 +-
Library/Homebrew/test/test/home_test.rb | 3 +-
Library/Homebrew/test/test/info_test.rb | 3 +-
Library/Homebrew/test/test/install_test.rb | 3 +-
Library/Homebrew/test/test/irb_test.rb | 3 +-
Library/Homebrew/test/test/leaves_test.rb | 3 +-
Library/Homebrew/test/test/link_test.rb | 3 +-
Library/Homebrew/test/test/linkapps_test.rb | 3 +-
Library/Homebrew/test/test/list_test.rb | 3 +-
Library/Homebrew/test/test/log_formula_test.rb | 3 +-
Library/Homebrew/test/test/log_test.rb | 3 +-
Library/Homebrew/test/test/migrate_test.rb | 3 +-
Library/Homebrew/test/test/migrator_test.rb | 2 +-
Library/Homebrew/test/test/missing_test.rb | 3 +-
Library/Homebrew/test/test/options_test.rb | 3 +-
Library/Homebrew/test/test/os/mac/mach_test.rb | 4 +-
Library/Homebrew/test/test/outdated_test.rb | 3 +-
Library/Homebrew/test/test/patching_test.rb | 12 +-
Library/Homebrew/test/test/pin_unpin_test.rb | 3 +-
Library/Homebrew/test/test/prefix_formula_test.rb | 3 +-
Library/Homebrew/test/test/prefix_test.rb | 3 +-
Library/Homebrew/test/test/prune_test.rb | 3 +-
Library/Homebrew/test/test/pull_offline_test.rb | 3 +-
Library/Homebrew/test/test/pull_test.rb | 3 +-
Library/Homebrew/test/test/readall_test.rb | 3 +-
.../Homebrew/test/test/reinstall_pinned_test.rb | 3 +-
Library/Homebrew/test/test/reinstall_test.rb | 3 +-
Library/Homebrew/test/test/repository_test.rb | 3 +-
Library/Homebrew/test/test/search_test.rb | 3 +-
Library/Homebrew/test/test/services_test.rb | 3 +-
Library/Homebrew/test/test/sh_test.rb | 3 +-
Library/Homebrew/test/test/switch_test.rb | 3 +-
Library/Homebrew/test/test/tab_test.rb | 2 +-
Library/Homebrew/test/test/tap_new_test.rb | 3 +-
Library/Homebrew/test/test/tap_test.rb | 3 +-
Library/Homebrew/test/test/test_formula_test.rb | 5 +-
Library/Homebrew/test/test/uninstall_test.rb | 2 +-
Library/Homebrew/test/test/unlink_test.rb | 3 +-
Library/Homebrew/test/test/unlinkapps_test.rb | 3 +-
Library/Homebrew/test/test/unpack_test.rb | 3 +-
Library/Homebrew/test/test/upgrade_test.rb | 3 +-
Library/Homebrew/test/test/uses_test.rb | 3 +-
Library/Homebrew/test/test/version_test.rb | 3 +-
Library/Homebrew/test/testball.rb | 15 --
Library/Homebrew/test/testball_bottle.rb | 20 ---
Library/Homebrew/test/testbottest.rb | 14 --
Library/Homebrew/test/testing_env.rb | 17 +-
213 files changed, 725 insertions(+), 667 deletions(-)
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
delete mode 120000 Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
delete mode 100644 Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
delete mode 100644 Library/Homebrew/test/fixtures/cask/AppWithBinary.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/MyFancyApp.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/caffeine-suite.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/caffeine.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/caffeines.zip
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.7z
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.air
delete mode 100755 Library/Homebrew/test/fixtures/cask/container.bz2
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.cab
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.dmg
delete mode 100755 Library/Homebrew/test/fixtures/cask/container.gz
delete mode 100755 Library/Homebrew/test/fixtures/cask/container.lzma
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.pkg
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.rar
delete mode 100755 Library/Homebrew/test/fixtures/cask/container.sit
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.tar.gz
delete mode 100644 Library/Homebrew/test/fixtures/cask/container.xar
delete mode 100755 Library/Homebrew/test/fixtures/cask/container.xz
delete mode 100644 Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore
delete mode 100755 Library/Homebrew/test/fixtures/cask/naked_executable
delete mode 100644 Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg
delete mode 100644 Library/Homebrew/test/fixtures/receipt.json
delete mode 100644 Library/Homebrew/test/fixtures/receipt_old.json
delete mode 100644 Library/Homebrew/test/fixtures/test.diff
delete mode 100644 Library/Homebrew/test/fixtures/test.eps
delete mode 100644 Library/Homebrew/test/fixtures/test.gif
delete mode 100644 Library/Homebrew/test/fixtures/test.ico
delete mode 100644 Library/Homebrew/test/fixtures/test.jpg
delete mode 100644 Library/Homebrew/test/fixtures/test.m4a
delete mode 100644 Library/Homebrew/test/fixtures/test.mp3
delete mode 100644 Library/Homebrew/test/fixtures/test.pcap
delete mode 100644 Library/Homebrew/test/fixtures/test.pdf
delete mode 100644 Library/Homebrew/test/fixtures/test.png
delete mode 100644 Library/Homebrew/test/fixtures/test.ps
delete mode 100644 Library/Homebrew/test/fixtures/test.svg
delete mode 100644 Library/Homebrew/test/fixtures/test.tiff
delete mode 100644 Library/Homebrew/test/fixtures/test.wav
delete mode 100644 Library/Homebrew/test/fixtures/updater_fixture.yaml
delete mode 100644 Library/Homebrew/test/helper/env.rb
delete mode 100644 Library/Homebrew/test/helper/integration_command_test_case.rb
delete mode 100644 Library/Homebrew/test/helper/shutup.rb
delete mode 100644 Library/Homebrew/test/lib/config.rb
delete mode 100644 Library/Homebrew/test/lib/integration_mocks.rb
delete mode 100755 Library/Homebrew/test/mach/a.out
delete mode 100644 Library/Homebrew/test/mach/fat.bundle
delete mode 100644 Library/Homebrew/test/mach/fat.dylib
delete mode 100644 Library/Homebrew/test/mach/i386.bundle
delete mode 100644 Library/Homebrew/test/mach/i386.dylib
delete mode 100644 Library/Homebrew/test/mach/x86_64.bundle
delete mode 100644 Library/Homebrew/test/mach/x86_64.dylib
delete mode 100644 Library/Homebrew/test/patches/noop-a.diff
delete mode 100644 Library/Homebrew/test/patches/noop-b.diff
delete mode 100644 Library/Homebrew/test/patches/noop-c.diff
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
create mode 100644 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
create mode 100644 Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/caffeine.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/caffeines.zip
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.7z
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.air
create mode 100755 Library/Homebrew/test/support/fixtures/cask/container.bz2
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.cab
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.dmg
create mode 100755 Library/Homebrew/test/support/fixtures/cask/container.gz
create mode 100755 Library/Homebrew/test/support/fixtures/cask/container.lzma
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.pkg
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.rar
create mode 100755 Library/Homebrew/test/support/fixtures/cask/container.sit
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.tar.gz
create mode 100644 Library/Homebrew/test/support/fixtures/cask/container.xar
create mode 100755 Library/Homebrew/test/support/fixtures/cask/container.xz
create mode 100644 Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore
create mode 100755 Library/Homebrew/test/support/fixtures/cask/naked_executable
create mode 100644 Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg
create mode 100755 Library/Homebrew/test/support/fixtures/mach/a.out
create mode 100644 Library/Homebrew/test/support/fixtures/mach/fat.bundle
create mode 100644 Library/Homebrew/test/support/fixtures/mach/fat.dylib
create mode 100644 Library/Homebrew/test/support/fixtures/mach/i386.bundle
create mode 100644 Library/Homebrew/test/support/fixtures/mach/i386.dylib
create mode 100644 Library/Homebrew/test/support/fixtures/mach/x86_64.bundle
create mode 100644 Library/Homebrew/test/support/fixtures/mach/x86_64.dylib
create mode 100644 Library/Homebrew/test/support/fixtures/patches/noop-a.diff
create mode 100644 Library/Homebrew/test/support/fixtures/patches/noop-b.diff
create mode 100644 Library/Homebrew/test/support/fixtures/patches/noop-c.diff
create mode 100644 Library/Homebrew/test/support/fixtures/receipt.json
create mode 100644 Library/Homebrew/test/support/fixtures/receipt_old.json
create mode 100644 Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz
create mode 100644 Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz
create mode 100644 Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz
create mode 100644 Library/Homebrew/test/support/fixtures/test.diff
create mode 100644 Library/Homebrew/test/support/fixtures/test.eps
create mode 100644 Library/Homebrew/test/support/fixtures/test.gif
create mode 100644 Library/Homebrew/test/support/fixtures/test.ico
create mode 100644 Library/Homebrew/test/support/fixtures/test.jpg
create mode 100644 Library/Homebrew/test/support/fixtures/test.m4a
create mode 100644 Library/Homebrew/test/support/fixtures/test.mp3
create mode 100644 Library/Homebrew/test/support/fixtures/test.pcap
create mode 100644 Library/Homebrew/test/support/fixtures/test.pdf
create mode 100644 Library/Homebrew/test/support/fixtures/test.png
create mode 100644 Library/Homebrew/test/support/fixtures/test.ps
create mode 100644 Library/Homebrew/test/support/fixtures/test.svg
create mode 100644 Library/Homebrew/test/support/fixtures/test.tiff
create mode 100644 Library/Homebrew/test/support/fixtures/test.wav
create mode 100644 Library/Homebrew/test/support/fixtures/testball.rb
create mode 100644 Library/Homebrew/test/support/fixtures/testball_bottle.rb
create mode 100644 Library/Homebrew/test/support/fixtures/testbottest.rb
create mode 100644 Library/Homebrew/test/support/fixtures/updater_fixture.yaml
create mode 100644 Library/Homebrew/test/support/helper/env.rb
create mode 100644 Library/Homebrew/test/support/helper/integration_command_test_case.rb
create mode 100644 Library/Homebrew/test/support/helper/shutup.rb
create mode 100644 Library/Homebrew/test/support/lib/config.rb
create mode 100644 Library/Homebrew/test/support/lib/integration_mocks.rb
delete mode 100644 Library/Homebrew/test/tarballs/testball-0.1-patches.tgz
delete mode 100644 Library/Homebrew/test/tarballs/testball-0.1.tbz
delete mode 100644 Library/Homebrew/test/tarballs/testbottest-0.1.tbz
delete mode 100644 Library/Homebrew/test/testball.rb
delete mode 100644 Library/Homebrew/test/testball_bottle.rb
delete mode 100644 Library/Homebrew/test/testbottest.rb
(limited to 'Library')
diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb
index 7e72a2cee..458fe00f4 100644
--- a/Library/Homebrew/cask/spec/spec_helper.rb
+++ b/Library/Homebrew/cask/spec/spec_helper.rb
@@ -8,15 +8,15 @@ end
# add Homebrew to load path
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
-$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/lib"))
+$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/support/lib"))
require "global"
# add Homebrew-Cask to load path
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.join("cask", "lib").to_s)
-require "test/helper/env"
-require "test/helper/shutup"
+require "test/support/helper/env"
+require "test/support/helper/shutup"
Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "*.rb")).each(&method(:require))
diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb
index 73459cb25..275ede304 100644
--- a/Library/Homebrew/cask/test/test_helper.rb
+++ b/Library/Homebrew/cask/test/test_helper.rb
@@ -6,15 +6,15 @@ require "simplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
# add Homebrew to load path
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
-$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/lib"))
+$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/support/lib"))
require "global"
# add Homebrew-Cask to load path
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.join("cask", "lib").to_s)
-require "test/helper/env"
-require "test/helper/shutup"
+require "test/support/helper/env"
+require "test/support/helper/shutup"
include Test::Helper::Env
include Test::Helper::Shutup
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
deleted file mode 120000
index 3e989830b..000000000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz b/Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
deleted file mode 100644
index d88838a94..000000000
Binary files a/Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip b/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip
deleted file mode 100644
index 4a5b318ba..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip b/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip
deleted file mode 100644
index 7c708038c..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip b/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip
deleted file mode 100644
index ba09ee681..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip b/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip
deleted file mode 100644
index ec4f97f07..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip b/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip
deleted file mode 100644
index ae6686c7e..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip b/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip
deleted file mode 100644
index c38f771ae..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeine.zip b/Library/Homebrew/test/fixtures/cask/caffeine.zip
deleted file mode 100644
index 99d61bbfb..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/caffeine.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip b/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip
deleted file mode 100644
index ce5064d09..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeines.zip b/Library/Homebrew/test/fixtures/cask/caffeines.zip
deleted file mode 100644
index 372fcc522..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/caffeines.zip and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.7z b/Library/Homebrew/test/fixtures/cask/container.7z
deleted file mode 100644
index 30dbe24f7..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.7z and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.air b/Library/Homebrew/test/fixtures/cask/container.air
deleted file mode 100644
index 64005aea3..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.air and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.bz2 b/Library/Homebrew/test/fixtures/cask/container.bz2
deleted file mode 100755
index 6ec60f31f..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.bz2 and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.cab b/Library/Homebrew/test/fixtures/cask/container.cab
deleted file mode 100644
index edc741aa1..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.cab and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.dmg b/Library/Homebrew/test/fixtures/cask/container.dmg
deleted file mode 100644
index 3b3cbf51c..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.dmg and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.gz b/Library/Homebrew/test/fixtures/cask/container.gz
deleted file mode 100755
index 67ede6b96..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.gz and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.lzma b/Library/Homebrew/test/fixtures/cask/container.lzma
deleted file mode 100755
index 2ff7ccee7..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.lzma and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.pkg b/Library/Homebrew/test/fixtures/cask/container.pkg
deleted file mode 100644
index 274f27e7a..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.pkg and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.rar b/Library/Homebrew/test/fixtures/cask/container.rar
deleted file mode 100644
index 7477c3bb4..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.rar and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.sit b/Library/Homebrew/test/fixtures/cask/container.sit
deleted file mode 100755
index 3e29d21dc..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.sit and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.tar.gz b/Library/Homebrew/test/fixtures/cask/container.tar.gz
deleted file mode 100644
index c464fb413..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.tar.gz and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.xar b/Library/Homebrew/test/fixtures/cask/container.xar
deleted file mode 100644
index 563a5ba1e..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.xar and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.xz b/Library/Homebrew/test/fixtures/cask/container.xz
deleted file mode 100755
index 74db22090..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/container.xz and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore b/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Library/Homebrew/test/fixtures/cask/naked_executable b/Library/Homebrew/test/fixtures/cask/naked_executable
deleted file mode 100755
index 039e4d006..000000000
--- a/Library/Homebrew/test/fixtures/cask/naked_executable
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exit 0
diff --git a/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg b/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg
deleted file mode 100644
index e72afe027..000000000
Binary files a/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/receipt.json b/Library/Homebrew/test/fixtures/receipt.json
deleted file mode 100644
index 404251026..000000000
--- a/Library/Homebrew/test/fixtures/receipt.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "used_options": [
- "--with-foo",
- "--without-bar"
- ],
- "unused_options": [
- "--with-baz",
- "--without-qux"
- ],
- "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",
- "stdlib": "libcxx",
- "compiler": "clang",
- "runtime_dependencies": [
- {
- "full_name": "foo",
- "version": "1.0"
- }
- ],
- "source": {
- "path": "/usr/local/Library/Taps/hombrew/homebrew-core/Formula/foo.rb",
- "tap": "homebrew/core",
- "spec": "stable",
- "versions": {
- "stable": "2.14",
- "devel": "2.15",
- "head": "HEAD-0000000"
- }
- }
-}
diff --git a/Library/Homebrew/test/fixtures/receipt_old.json b/Library/Homebrew/test/fixtures/receipt_old.json
deleted file mode 100644
index 955d56b47..000000000
--- a/Library/Homebrew/test/fixtures/receipt_old.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "used_options": [
- "--with-foo",
- "--without-bar"
- ],
- "unused_options": [
- "--with-baz",
- "--without-qux"
- ],
- "built_as_bottle": false,
- "poured_from_bottle": true,
- "tapped_from": "Homebrew/homebrew",
- "time": 1403827774,
- "HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
- "stdlib": "libcxx",
- "compiler": "clang"
-}
diff --git a/Library/Homebrew/test/fixtures/test.diff b/Library/Homebrew/test/fixtures/test.diff
deleted file mode 100644
index 7b57f8fc9..000000000
--- a/Library/Homebrew/test/fixtures/test.diff
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/libexec/NOOP b/libexec/NOOP
-index bfdda4c..e08d8f4 100755
---- a/libexec/NOOP
-+++ b/libexec/NOOP
-@@ -1,2 +1,2 @@
- #!/bin/bash
--echo NOOP
-\ No newline at end of file
-+echo ABCD
-\ No newline at end of file
diff --git a/Library/Homebrew/test/fixtures/test.eps b/Library/Homebrew/test/fixtures/test.eps
deleted file mode 100644
index 2832613e7..000000000
--- a/Library/Homebrew/test/fixtures/test.eps
+++ /dev/null
@@ -1,25 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%BoundingBox: 73 499 211 513
-%%HiResBoundingBox: 73.000000 499.500000 211.000000 512.500000
-%%EndComments
-% EPSF created by ps2eps 1.68
-%%BeginProlog
-save
-countdictstack
-mark
-newpath
-/showpage {} def
-/setpagedevice {pop} def
-%%EndProlog
-%%Page 1 1
-/Courier
-20 selectfont
-72 500 moveto
-(Hello World!) show
-showpage
-%%Trailer
-cleartomark
-countdictstack
-exch sub { end } repeat
-restore
-%%EOF
diff --git a/Library/Homebrew/test/fixtures/test.gif b/Library/Homebrew/test/fixtures/test.gif
deleted file mode 100644
index 0589d2082..000000000
Binary files a/Library/Homebrew/test/fixtures/test.gif and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.ico b/Library/Homebrew/test/fixtures/test.ico
deleted file mode 100644
index 714f3478d..000000000
Binary files a/Library/Homebrew/test/fixtures/test.ico and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.jpg b/Library/Homebrew/test/fixtures/test.jpg
deleted file mode 100644
index 1adaa50a6..000000000
Binary files a/Library/Homebrew/test/fixtures/test.jpg and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.m4a b/Library/Homebrew/test/fixtures/test.m4a
deleted file mode 100644
index 7650fc482..000000000
Binary files a/Library/Homebrew/test/fixtures/test.m4a and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.mp3 b/Library/Homebrew/test/fixtures/test.mp3
deleted file mode 100644
index a01322383..000000000
Binary files a/Library/Homebrew/test/fixtures/test.mp3 and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.pcap b/Library/Homebrew/test/fixtures/test.pcap
deleted file mode 100644
index 671197e8a..000000000
Binary files a/Library/Homebrew/test/fixtures/test.pcap and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.pdf b/Library/Homebrew/test/fixtures/test.pdf
deleted file mode 100644
index 1f2ac6390..000000000
--- a/Library/Homebrew/test/fixtures/test.pdf
+++ /dev/null
@@ -1,24 +0,0 @@
-%PDF-1.6
-%μῦ
-1 0 obj<>endobj
-2 0 obj<>endobj
-3 0 obj<>endobj
-4 0 obj<>>>endobj
-5 0 obj<>endobj
-6 0 obj<>stream
-BT /F1 24 Tf 175 720 Td (Homebrew test.)Tj ET
-endstream
-endobj
-xref
-0 7
-0000000000 65536 f
-0000000016 00000 n
-0000000059 00000 n
-0000000108 00000 n
-0000000202 00000 n
-0000000238 00000 n
-0000000299 00000 n
-trailer<>
-startxref
-390
-%%EOF
diff --git a/Library/Homebrew/test/fixtures/test.png b/Library/Homebrew/test/fixtures/test.png
deleted file mode 100644
index 18d7a15a9..000000000
Binary files a/Library/Homebrew/test/fixtures/test.png and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.ps b/Library/Homebrew/test/fixtures/test.ps
deleted file mode 100644
index 68aae0621..000000000
--- a/Library/Homebrew/test/fixtures/test.ps
+++ /dev/null
@@ -1,6 +0,0 @@
-%!PS
-/Courier
-20 selectfont
-72 500 moveto
-(Hello World!) show
-showpage
diff --git a/Library/Homebrew/test/fixtures/test.svg b/Library/Homebrew/test/fixtures/test.svg
deleted file mode 100644
index 1869e624c..000000000
--- a/Library/Homebrew/test/fixtures/test.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/Library/Homebrew/test/fixtures/test.tiff b/Library/Homebrew/test/fixtures/test.tiff
deleted file mode 100644
index ae756b264..000000000
Binary files a/Library/Homebrew/test/fixtures/test.tiff and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/test.wav b/Library/Homebrew/test/fixtures/test.wav
deleted file mode 100644
index c846b8a9b..000000000
Binary files a/Library/Homebrew/test/fixtures/test.wav and /dev/null differ
diff --git a/Library/Homebrew/test/fixtures/updater_fixture.yaml b/Library/Homebrew/test/fixtures/updater_fixture.yaml
deleted file mode 100644
index 06a6a0c7f..000000000
--- a/Library/Homebrew/test/fixtures/updater_fixture.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-update_git_diff_output_without_formulae_changes: |
- M Library/Homebrew/ARGV+yeast.rb
- A Library/Homebrew/beer_events.rb
- A Library/Homebrew/hardware.rb
- D Library/Homebrew/hw.model.c
- M README
- M bin/brew
-update_git_diff_output_with_formulae_changes: |
- M Library/Contributions/brew_bash_completion.sh
- A Formula/antiword.rb
- A Formula/bash-completion.rb
- A Formula/ddrescue.rb
- A Formula/dict.rb
- A Formula/lua.rb
- M Formula/xar.rb
- M Formula/yajl.rb
- M Library/Homebrew/ARGV+yeast.rb
- M Library/Homebrew/beer_events.rb
- M Library/Homebrew/hardware.rb
- M Library/Homebrew/hw.model.c
- M Library/Homebrew/hw.model.rb
- M Library/Homebrew/pathname+yeast.rb
- M Library/Homebrew/unittest.rb
- M Library/Homebrew/utils.rb
- M README
- M bin/brew
-update_git_diff_output_with_removed_formulae: |
- A Formula/flac123.rb
- M Formula/gdal.rb
- M Formula/grass.rb
- M Formula/json_spirit.rb
- A Formula/libbson.rb
- D Formula/libgsasl.rb
-update_git_diff_output_with_changed_filetype: |
- A Library/ENV/4.3/ant
- T Library/ENV/4.3/bsdmake
- M Library/ENV/4.3/make
- M Formula/elixir.rb
- A Formula/libbson.rb
- D Formula/libgsasl.rb
- M Library/Homebrew/cmd/update.rb
- M SUPPORTERS.md
-update_git_diff_output_with_formula_rename: |
- R100 Formula/cv.rb Formula/progress.rb
-update_git_diff_output_with_restructured_tap: |
- R100 git.rb Formula/git.rb
- R100 lua.rb Formula/lua.rb
-update_git_diff_output_with_formula_rename_and_restructuring: |
- R100 xchat.rb Formula/xchat2.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
- M Requirements/some_requirement.rb
- D another_ruby_file.rb
- A a_ruby_file.rb
- A CONTRIBUTING.md
- M Formula/git.rb
- A Formula/lua.rb
- M lib/not_a_formula.rb
- A lib/not_a_formula2.rb
- D lib/not_a_formula3.rb
diff --git a/Library/Homebrew/test/helper/env.rb b/Library/Homebrew/test/helper/env.rb
deleted file mode 100644
index 904a1d4c7..000000000
--- a/Library/Homebrew/test/helper/env.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-module Test
- module Helper
- module Env
- def with_environment(partial_env)
- old = ENV.to_hash
- ENV.update partial_env
- begin
- yield
- ensure
- ENV.replace old
- end
- end
- end
- end
-end
diff --git a/Library/Homebrew/test/helper/integration_command_test_case.rb b/Library/Homebrew/test/helper/integration_command_test_case.rb
deleted file mode 100644
index 2f137e14a..000000000
--- a/Library/Homebrew/test/helper/integration_command_test_case.rb
+++ /dev/null
@@ -1,200 +0,0 @@
-require "bundler"
-require "testing_env"
-require "fileutils"
-require "pathname"
-require "formula"
-
-class IntegrationCommandTestCase < Homebrew::TestCase
- def setup
- @cmd_id_index = 0 # Assign unique IDs to invocations of `cmd_output`.
- (HOMEBREW_PREFIX/"bin").mkpath
- FileUtils.touch HOMEBREW_PREFIX/"bin/brew"
- end
-
- def teardown
- coretap = CoreTap.new
- paths_to_delete = [
- HOMEBREW_LINKED_KEGS,
- HOMEBREW_PINNED_KEGS,
- HOMEBREW_CELLAR.children,
- HOMEBREW_CACHE.children,
- HOMEBREW_LOCK_DIR.children,
- HOMEBREW_LOGS.children,
- HOMEBREW_TEMP.children,
- HOMEBREW_PREFIX/"bin",
- HOMEBREW_PREFIX/"share",
- HOMEBREW_PREFIX/"opt",
- HOMEBREW_PREFIX/"Caskroom",
- HOMEBREW_LIBRARY/"Taps/caskroom",
- HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-bundle",
- HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo",
- HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-services",
- HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-shallow",
- HOMEBREW_REPOSITORY/".git",
- coretap.path/".git",
- coretap.alias_dir,
- coretap.formula_dir.children,
- coretap.path/"formula_renames.json",
- ].flatten
- FileUtils.rm_rf paths_to_delete
- end
-
- def needs_test_cmd_taps
- return if ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"]
- skip "HOMEBREW_TEST_OFFICIAL_CMD_TAPS is not set"
- end
-
- def needs_macos
- skip "Not on MacOS" unless OS.mac?
- end
-
- def cmd_id_from_args(args)
- args_pretty = args.join(" ").gsub(TEST_TMPDIR, "@TMPDIR@")
- test_pretty = "#{self.class.name}\##{name}.#{@cmd_id_index += 1}"
- "[#{test_pretty}] brew #{args_pretty}"
- end
-
- def cmd_output(*args)
- # 1.8-compatible way of writing def cmd_output(*args, **env)
- env = args.last.is_a?(Hash) ? args.pop : {}
- cmd_args = %W[
- -W0
- -I#{HOMEBREW_LIBRARY_PATH}/test/lib
- -rconfig
- ]
- if ENV["HOMEBREW_TESTS_COVERAGE"]
- # This is needed only because we currently use a patched version of
- # simplecov, and gems installed through git are not available without
- # requiring bundler/setup first. See also the comment in test/Gemfile.
- # Remove this line when we'll switch back to a stable simplecov release.
- cmd_args << "-rbundler/setup"
- cmd_args << "-rsimplecov"
- end
- cmd_args << "-rintegration_mocks"
- cmd_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
- cmd_args += args
- developer = ENV["HOMEBREW_DEVELOPER"]
- Bundler.with_original_env do
- ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
- ENV["HOMEBREW_INTEGRATION_TEST"] = cmd_id_from_args(args)
- ENV["HOMEBREW_TEST_TMPDIR"] = TEST_TMPDIR
- ENV["HOMEBREW_DEVELOPER"] = developer
- env.each_pair do |k, v|
- ENV[k] = v
- end
-
- read, write = IO.pipe
- begin
- pid = fork do
- read.close
- $stdout.reopen(write)
- $stderr.reopen(write)
- write.close
- exec RUBY_PATH, *cmd_args
- end
- write.close
- read.read.chomp
- ensure
- Process.wait(pid)
- read.close
- end
- end
- end
-
- def cmd(*args)
- output = cmd_output(*args)
- status = $?.exitstatus
- puts "\n'brew #{args.join " "}' output: #{output}" if status.nonzero?
- assert_equal 0, status
- output
- end
-
- def cmd_fail(*args)
- output = cmd_output(*args)
- status = $?.exitstatus
- $stderr.puts "\n'brew #{args.join " "}'" if status.zero?
- refute_equal 0, status
- output
- end
-
- def setup_test_formula(name, content = nil)
- formula_path = CoreTap.new.formula_dir/"#{name}.rb"
-
- case name
- when /^testball/
- content = <<-EOS.undent
- desc "Some test"
- homepage "https://example.com/#{name}"
- url "file://#{File.expand_path("../..", __FILE__)}/tarballs/testball-0.1.tbz"
- sha256 "#{TESTBALL_SHA256}"
-
- option "with-foo", "Build with foo"
-
- def install
- (prefix/"foo"/"test").write("test") if build.with? "foo"
- prefix.install Dir["*"]
- (buildpath/"test.c").write \
- "#include \\nint main(){return printf(\\"test\\");}"
- bin.mkpath
- system ENV.cc, "test.c", "-o", bin/"test"
- end
-
- #{content}
-
- # something here
- EOS
- when "foo"
- content = <<-EOS.undent
- url "https://example.com/#{name}-1.0"
- EOS
- when "bar"
- content = <<-EOS.undent
- url "https://example.com/#{name}-1.0"
- depends_on "foo"
- EOS
- end
-
- formula_path.write <<-EOS.undent
- class #{Formulary.class_s(name)} < Formula
- #{content}
- end
- EOS
-
- formula_path
- end
-
- def setup_remote_tap(name)
- tap = Tap.fetch name
- tap.install(full_clone: false, quiet: true) unless tap.installed?
- tap
- end
-
- def install_and_rename_coretap_formula(old_name, new_name)
- core_tap = CoreTap.new
- core_tap.path.cd do
- shutup do
- system "git", "init"
- system "git", "add", "--all"
- system "git", "commit", "-m",
- "#{old_name.capitalize} has not yet been renamed"
- end
- end
-
- cmd("install", old_name)
- (core_tap.path/"Formula/#{old_name}.rb").unlink
- formula_renames = core_tap.path/"formula_renames.json"
- formula_renames.write Utils::JSON.dump(old_name => new_name)
-
- core_tap.path.cd do
- shutup do
- system "git", "add", "--all"
- system "git", "commit", "-m",
- "#{old_name.capitalize} has been renamed to #{new_name.capitalize}"
- end
- end
- end
-
- def testball
- "#{File.expand_path("../..", __FILE__)}/testball.rb"
- end
-end
diff --git a/Library/Homebrew/test/helper/shutup.rb b/Library/Homebrew/test/helper/shutup.rb
deleted file mode 100644
index fa5f08d31..000000000
--- a/Library/Homebrew/test/helper/shutup.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-module Test
- module Helper
- module Shutup
- def shutup
- if ENV.key?("VERBOSE_TESTS")
- yield
- else
- begin
- tmperr = $stderr.clone
- tmpout = $stdout.clone
- $stderr.reopen("/dev/null")
- $stdout.reopen("/dev/null")
- yield
- ensure
- $stderr.reopen(tmperr)
- $stdout.reopen(tmpout)
- tmperr.close
- tmpout.close
- end
- end
- end
- end
- end
-end
diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb
deleted file mode 100644
index 4fe62d409..000000000
--- a/Library/Homebrew/test/lib/config.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-unless ENV["HOMEBREW_BREW_FILE"]
- raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
-end
-
-require "tmpdir"
-require "pathname"
-
-HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
-
-TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k|
- dir = Dir.mktmpdir("homebrew-tests-", ENV["HOMEBREW_TEMP"] || "/tmp")
- at_exit { FileUtils.remove_entry(dir) }
- ENV[k] = dir
-end
-
-# Paths pointing into the Homebrew code base that persist across test runs
-HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__))
-HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims"
-HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
-
-# Paths redirected to a temporary directory and wiped at the end of the test run
-HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix")
-HOMEBREW_REPOSITORY = HOMEBREW_PREFIX
-HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library"
-HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache"
-HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache"
-HOMEBREW_LINKED_KEGS = HOMEBREW_PREFIX.parent+"linked"
-HOMEBREW_PINNED_KEGS = HOMEBREW_PREFIX.parent+"pinned"
-HOMEBREW_LOCK_DIR = HOMEBREW_PREFIX.parent+"locks"
-HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
-HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs"
-HOMEBREW_TEMP = HOMEBREW_PREFIX.parent+"temp"
-
-TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "fixtures")
-
-TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37".freeze
-TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze
-TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9".freeze
-PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa".freeze
-PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b90".freeze
diff --git a/Library/Homebrew/test/lib/integration_mocks.rb b/Library/Homebrew/test/lib/integration_mocks.rb
deleted file mode 100644
index 6effb0cde..000000000
--- a/Library/Homebrew/test/lib/integration_mocks.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-module Homebrew
- module Diagnostic
- class Checks
- def check_integration_test
- "This is an integration test" if ENV["HOMEBREW_INTEGRATION_TEST"]
- end
- end
- end
-
- def exec(*args)
- if ENV["HOMEBREW_TESTS_COVERAGE"] && ENV["HOMEBREW_INTEGRATION_TEST"]
- # Ensure we get coverage results before replacing the current process.
- SimpleCov.result
- end
- Kernel.exec(*args)
- end
-end
diff --git a/Library/Homebrew/test/mach/a.out b/Library/Homebrew/test/mach/a.out
deleted file mode 100755
index 18e0e982f..000000000
Binary files a/Library/Homebrew/test/mach/a.out and /dev/null differ
diff --git a/Library/Homebrew/test/mach/fat.bundle b/Library/Homebrew/test/mach/fat.bundle
deleted file mode 100644
index f60f1e8bb..000000000
Binary files a/Library/Homebrew/test/mach/fat.bundle and /dev/null differ
diff --git a/Library/Homebrew/test/mach/fat.dylib b/Library/Homebrew/test/mach/fat.dylib
deleted file mode 100644
index 6886a6a8b..000000000
Binary files a/Library/Homebrew/test/mach/fat.dylib and /dev/null differ
diff --git a/Library/Homebrew/test/mach/i386.bundle b/Library/Homebrew/test/mach/i386.bundle
deleted file mode 100644
index b6f94710d..000000000
Binary files a/Library/Homebrew/test/mach/i386.bundle and /dev/null differ
diff --git a/Library/Homebrew/test/mach/i386.dylib b/Library/Homebrew/test/mach/i386.dylib
deleted file mode 100644
index 0304dca01..000000000
Binary files a/Library/Homebrew/test/mach/i386.dylib and /dev/null differ
diff --git a/Library/Homebrew/test/mach/x86_64.bundle b/Library/Homebrew/test/mach/x86_64.bundle
deleted file mode 100644
index d1bde419f..000000000
Binary files a/Library/Homebrew/test/mach/x86_64.bundle and /dev/null differ
diff --git a/Library/Homebrew/test/mach/x86_64.dylib b/Library/Homebrew/test/mach/x86_64.dylib
deleted file mode 100644
index 781b41cb4..000000000
Binary files a/Library/Homebrew/test/mach/x86_64.dylib and /dev/null differ
diff --git a/Library/Homebrew/test/patches/noop-a.diff b/Library/Homebrew/test/patches/noop-a.diff
deleted file mode 100644
index 7b57f8fc9..000000000
--- a/Library/Homebrew/test/patches/noop-a.diff
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/libexec/NOOP b/libexec/NOOP
-index bfdda4c..e08d8f4 100755
---- a/libexec/NOOP
-+++ b/libexec/NOOP
-@@ -1,2 +1,2 @@
- #!/bin/bash
--echo NOOP
-\ No newline at end of file
-+echo ABCD
-\ No newline at end of file
diff --git a/Library/Homebrew/test/patches/noop-b.diff b/Library/Homebrew/test/patches/noop-b.diff
deleted file mode 100644
index bc081ca82..000000000
--- a/Library/Homebrew/test/patches/noop-b.diff
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git libexec/NOOP libexec/NOOP
-index bfdda4c..e08d8f4 100755
---- libexec/NOOP
-+++ libexec/NOOP
-@@ -1,2 +1,2 @@
- #!/bin/bash
--echo NOOP
-\ No newline at end of file
-+echo ABCD
-\ No newline at end of file
diff --git a/Library/Homebrew/test/patches/noop-c.diff b/Library/Homebrew/test/patches/noop-c.diff
deleted file mode 100644
index 6d0de5b7b..000000000
--- a/Library/Homebrew/test/patches/noop-c.diff
+++ /dev/null
@@ -1,9 +0,0 @@
-diff --git a/libexec/NOOP b/libexec/NOOP
-index e08d8f4..3ebfb9d 100755
---- a/libexec/NOOP
-+++ b/libexec/NOOP
-@@ -1,2 +1,2 @@
- #!/bin/bash
--echo ABCD
-\ No newline at end of file
-+echo 1234
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
new file mode 120000
index 000000000..3e989830b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
@@ -0,0 +1 @@
+testball_bottle-0.1.yosemite.bottle.tar.gz
\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
new file mode 100644
index 000000000..d88838a94
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip b/Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip
new file mode 100644
index 000000000..4a5b318ba
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip b/Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip
new file mode 100644
index 000000000..7c708038c
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip b/Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip
new file mode 100644
index 000000000..ba09ee681
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip b/Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip
new file mode 100644
index 000000000..ec4f97f07
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip b/Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip
new file mode 100644
index 000000000..ae6686c7e
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip b/Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip
new file mode 100644
index 000000000..c38f771ae
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/caffeine.zip b/Library/Homebrew/test/support/fixtures/cask/caffeine.zip
new file mode 100644
index 000000000..99d61bbfb
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/caffeine.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip b/Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip
new file mode 100644
index 000000000..ce5064d09
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/caffeines.zip b/Library/Homebrew/test/support/fixtures/cask/caffeines.zip
new file mode 100644
index 000000000..372fcc522
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/caffeines.zip differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.7z b/Library/Homebrew/test/support/fixtures/cask/container.7z
new file mode 100644
index 000000000..30dbe24f7
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.7z differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.air b/Library/Homebrew/test/support/fixtures/cask/container.air
new file mode 100644
index 000000000..64005aea3
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.air differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.bz2 b/Library/Homebrew/test/support/fixtures/cask/container.bz2
new file mode 100755
index 000000000..6ec60f31f
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.bz2 differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.cab b/Library/Homebrew/test/support/fixtures/cask/container.cab
new file mode 100644
index 000000000..edc741aa1
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.cab differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.dmg b/Library/Homebrew/test/support/fixtures/cask/container.dmg
new file mode 100644
index 000000000..3b3cbf51c
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.dmg differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.gz b/Library/Homebrew/test/support/fixtures/cask/container.gz
new file mode 100755
index 000000000..67ede6b96
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.gz differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.lzma b/Library/Homebrew/test/support/fixtures/cask/container.lzma
new file mode 100755
index 000000000..2ff7ccee7
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.lzma differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.pkg b/Library/Homebrew/test/support/fixtures/cask/container.pkg
new file mode 100644
index 000000000..274f27e7a
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.pkg differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.rar b/Library/Homebrew/test/support/fixtures/cask/container.rar
new file mode 100644
index 000000000..7477c3bb4
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.rar differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.sit b/Library/Homebrew/test/support/fixtures/cask/container.sit
new file mode 100755
index 000000000..3e29d21dc
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.sit differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.tar.gz b/Library/Homebrew/test/support/fixtures/cask/container.tar.gz
new file mode 100644
index 000000000..c464fb413
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.tar.gz differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.xar b/Library/Homebrew/test/support/fixtures/cask/container.xar
new file mode 100644
index 000000000..563a5ba1e
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.xar differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/container.xz b/Library/Homebrew/test/support/fixtures/cask/container.xz
new file mode 100755
index 000000000..74db22090
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/container.xz differ
diff --git a/Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore b/Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/Library/Homebrew/test/support/fixtures/cask/naked_executable b/Library/Homebrew/test/support/fixtures/cask/naked_executable
new file mode 100755
index 000000000..039e4d006
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/naked_executable
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 0
diff --git a/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg b/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg
new file mode 100644
index 000000000..e72afe027
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/a.out b/Library/Homebrew/test/support/fixtures/mach/a.out
new file mode 100755
index 000000000..18e0e982f
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/a.out differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/fat.bundle b/Library/Homebrew/test/support/fixtures/mach/fat.bundle
new file mode 100644
index 000000000..f60f1e8bb
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/fat.bundle differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/fat.dylib b/Library/Homebrew/test/support/fixtures/mach/fat.dylib
new file mode 100644
index 000000000..6886a6a8b
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/fat.dylib differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/i386.bundle b/Library/Homebrew/test/support/fixtures/mach/i386.bundle
new file mode 100644
index 000000000..b6f94710d
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/i386.bundle differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/i386.dylib b/Library/Homebrew/test/support/fixtures/mach/i386.dylib
new file mode 100644
index 000000000..0304dca01
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/i386.dylib differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/x86_64.bundle b/Library/Homebrew/test/support/fixtures/mach/x86_64.bundle
new file mode 100644
index 000000000..d1bde419f
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/x86_64.bundle differ
diff --git a/Library/Homebrew/test/support/fixtures/mach/x86_64.dylib b/Library/Homebrew/test/support/fixtures/mach/x86_64.dylib
new file mode 100644
index 000000000..781b41cb4
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/mach/x86_64.dylib differ
diff --git a/Library/Homebrew/test/support/fixtures/patches/noop-a.diff b/Library/Homebrew/test/support/fixtures/patches/noop-a.diff
new file mode 100644
index 000000000..7b57f8fc9
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-a.diff
@@ -0,0 +1,10 @@
+diff --git a/libexec/NOOP b/libexec/NOOP
+index bfdda4c..e08d8f4 100755
+--- a/libexec/NOOP
++++ b/libexec/NOOP
+@@ -1,2 +1,2 @@
+ #!/bin/bash
+-echo NOOP
+\ No newline at end of file
++echo ABCD
+\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/patches/noop-b.diff b/Library/Homebrew/test/support/fixtures/patches/noop-b.diff
new file mode 100644
index 000000000..bc081ca82
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-b.diff
@@ -0,0 +1,10 @@
+diff --git libexec/NOOP libexec/NOOP
+index bfdda4c..e08d8f4 100755
+--- libexec/NOOP
++++ libexec/NOOP
+@@ -1,2 +1,2 @@
+ #!/bin/bash
+-echo NOOP
+\ No newline at end of file
++echo ABCD
+\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/patches/noop-c.diff b/Library/Homebrew/test/support/fixtures/patches/noop-c.diff
new file mode 100644
index 000000000..6d0de5b7b
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-c.diff
@@ -0,0 +1,9 @@
+diff --git a/libexec/NOOP b/libexec/NOOP
+index e08d8f4..3ebfb9d 100755
+--- a/libexec/NOOP
++++ b/libexec/NOOP
+@@ -1,2 +1,2 @@
+ #!/bin/bash
+-echo ABCD
+\ No newline at end of file
++echo 1234
diff --git a/Library/Homebrew/test/support/fixtures/receipt.json b/Library/Homebrew/test/support/fixtures/receipt.json
new file mode 100644
index 000000000..404251026
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/receipt.json
@@ -0,0 +1,37 @@
+{
+ "used_options": [
+ "--with-foo",
+ "--without-bar"
+ ],
+ "unused_options": [
+ "--with-baz",
+ "--without-qux"
+ ],
+ "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",
+ "stdlib": "libcxx",
+ "compiler": "clang",
+ "runtime_dependencies": [
+ {
+ "full_name": "foo",
+ "version": "1.0"
+ }
+ ],
+ "source": {
+ "path": "/usr/local/Library/Taps/hombrew/homebrew-core/Formula/foo.rb",
+ "tap": "homebrew/core",
+ "spec": "stable",
+ "versions": {
+ "stable": "2.14",
+ "devel": "2.15",
+ "head": "HEAD-0000000"
+ }
+ }
+}
diff --git a/Library/Homebrew/test/support/fixtures/receipt_old.json b/Library/Homebrew/test/support/fixtures/receipt_old.json
new file mode 100644
index 000000000..955d56b47
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/receipt_old.json
@@ -0,0 +1,17 @@
+{
+ "used_options": [
+ "--with-foo",
+ "--without-bar"
+ ],
+ "unused_options": [
+ "--with-baz",
+ "--without-qux"
+ ],
+ "built_as_bottle": false,
+ "poured_from_bottle": true,
+ "tapped_from": "Homebrew/homebrew",
+ "time": 1403827774,
+ "HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
+ "stdlib": "libcxx",
+ "compiler": "clang"
+}
diff --git a/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz
new file mode 100644
index 000000000..4b43f535e
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz differ
diff --git a/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz
new file mode 100644
index 000000000..c7e1af1f4
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz differ
diff --git a/Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz b/Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz
new file mode 100644
index 000000000..83f7ab1dd
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz differ
diff --git a/Library/Homebrew/test/support/fixtures/test.diff b/Library/Homebrew/test/support/fixtures/test.diff
new file mode 100644
index 000000000..7b57f8fc9
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.diff
@@ -0,0 +1,10 @@
+diff --git a/libexec/NOOP b/libexec/NOOP
+index bfdda4c..e08d8f4 100755
+--- a/libexec/NOOP
++++ b/libexec/NOOP
+@@ -1,2 +1,2 @@
+ #!/bin/bash
+-echo NOOP
+\ No newline at end of file
++echo ABCD
+\ No newline at end of file
diff --git a/Library/Homebrew/test/support/fixtures/test.eps b/Library/Homebrew/test/support/fixtures/test.eps
new file mode 100644
index 000000000..2832613e7
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.eps
@@ -0,0 +1,25 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 73 499 211 513
+%%HiResBoundingBox: 73.000000 499.500000 211.000000 512.500000
+%%EndComments
+% EPSF created by ps2eps 1.68
+%%BeginProlog
+save
+countdictstack
+mark
+newpath
+/showpage {} def
+/setpagedevice {pop} def
+%%EndProlog
+%%Page 1 1
+/Courier
+20 selectfont
+72 500 moveto
+(Hello World!) show
+showpage
+%%Trailer
+cleartomark
+countdictstack
+exch sub { end } repeat
+restore
+%%EOF
diff --git a/Library/Homebrew/test/support/fixtures/test.gif b/Library/Homebrew/test/support/fixtures/test.gif
new file mode 100644
index 000000000..0589d2082
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.gif differ
diff --git a/Library/Homebrew/test/support/fixtures/test.ico b/Library/Homebrew/test/support/fixtures/test.ico
new file mode 100644
index 000000000..714f3478d
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.ico differ
diff --git a/Library/Homebrew/test/support/fixtures/test.jpg b/Library/Homebrew/test/support/fixtures/test.jpg
new file mode 100644
index 000000000..1adaa50a6
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.jpg differ
diff --git a/Library/Homebrew/test/support/fixtures/test.m4a b/Library/Homebrew/test/support/fixtures/test.m4a
new file mode 100644
index 000000000..7650fc482
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.m4a differ
diff --git a/Library/Homebrew/test/support/fixtures/test.mp3 b/Library/Homebrew/test/support/fixtures/test.mp3
new file mode 100644
index 000000000..a01322383
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.mp3 differ
diff --git a/Library/Homebrew/test/support/fixtures/test.pcap b/Library/Homebrew/test/support/fixtures/test.pcap
new file mode 100644
index 000000000..671197e8a
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.pcap differ
diff --git a/Library/Homebrew/test/support/fixtures/test.pdf b/Library/Homebrew/test/support/fixtures/test.pdf
new file mode 100644
index 000000000..1f2ac6390
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.pdf
@@ -0,0 +1,24 @@
+%PDF-1.6
+%μῦ
+1 0 obj<>endobj
+2 0 obj<>endobj
+3 0 obj<>endobj
+4 0 obj<>>>endobj
+5 0 obj<>endobj
+6 0 obj<>stream
+BT /F1 24 Tf 175 720 Td (Homebrew test.)Tj ET
+endstream
+endobj
+xref
+0 7
+0000000000 65536 f
+0000000016 00000 n
+0000000059 00000 n
+0000000108 00000 n
+0000000202 00000 n
+0000000238 00000 n
+0000000299 00000 n
+trailer<>
+startxref
+390
+%%EOF
diff --git a/Library/Homebrew/test/support/fixtures/test.png b/Library/Homebrew/test/support/fixtures/test.png
new file mode 100644
index 000000000..18d7a15a9
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.png differ
diff --git a/Library/Homebrew/test/support/fixtures/test.ps b/Library/Homebrew/test/support/fixtures/test.ps
new file mode 100644
index 000000000..68aae0621
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.ps
@@ -0,0 +1,6 @@
+%!PS
+/Courier
+20 selectfont
+72 500 moveto
+(Hello World!) show
+showpage
diff --git a/Library/Homebrew/test/support/fixtures/test.svg b/Library/Homebrew/test/support/fixtures/test.svg
new file mode 100644
index 000000000..1869e624c
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.svg
@@ -0,0 +1,4 @@
+
diff --git a/Library/Homebrew/test/support/fixtures/test.tiff b/Library/Homebrew/test/support/fixtures/test.tiff
new file mode 100644
index 000000000..ae756b264
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.tiff differ
diff --git a/Library/Homebrew/test/support/fixtures/test.wav b/Library/Homebrew/test/support/fixtures/test.wav
new file mode 100644
index 000000000..c846b8a9b
Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/test.wav differ
diff --git a/Library/Homebrew/test/support/fixtures/testball.rb b/Library/Homebrew/test/support/fixtures/testball.rb
new file mode 100644
index 000000000..ba725f51e
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/testball.rb
@@ -0,0 +1,15 @@
+class Testball < Formula
+ def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
+ self.class.instance_eval do
+ stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
+ stable.sha256 TESTBALL_SHA256
+ end
+ super
+ end
+
+ def install
+ prefix.install "bin"
+ prefix.install "libexec"
+ Dir.chdir "doc"
+ end
+end
diff --git a/Library/Homebrew/test/support/fixtures/testball_bottle.rb b/Library/Homebrew/test/support/fixtures/testball_bottle.rb
new file mode 100644
index 000000000..9453255e6
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/testball_bottle.rb
@@ -0,0 +1,20 @@
+class TestballBottle < Formula
+ def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
+ self.class.instance_eval do
+ stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
+ stable.sha256 TESTBALL_SHA256
+ stable.bottle do
+ cellar :any_skip_relocation
+ root_url "file://#{TEST_FIXTURE_DIR}/bottles"
+ sha256 "9abc8ce779067e26556002c4ca6b9427b9874d25f0cafa7028e05b5c5c410cb4" => Utils::Bottles.tag
+ end
+ cxxstdlib_check :skip
+ end
+ super
+ end
+
+ def install
+ prefix.install "bin"
+ prefix.install "libexec"
+ end
+end
diff --git a/Library/Homebrew/test/support/fixtures/testbottest.rb b/Library/Homebrew/test/support/fixtures/testbottest.rb
new file mode 100644
index 000000000..28b88567e
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/testbottest.rb
@@ -0,0 +1,14 @@
+class Testbottest < Formula
+ desc "Minimal C program and Makefile used for testing Homebrew."
+ homepage "https://github.com/Homebrew/brew"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testbottest-0.1.tbz"
+ sha256 "78b54d8f31585c9773bed12b4aa4ab2ce458ebd044b9406cb24d40aa5107f082"
+
+ def install
+ system "make", "install", "PREFIX=#{prefix}"
+ end
+
+ test do
+ assert_equal "testbottest\n", shell_output("#{bin}/testbottest")
+ end
+end
diff --git a/Library/Homebrew/test/support/fixtures/updater_fixture.yaml b/Library/Homebrew/test/support/fixtures/updater_fixture.yaml
new file mode 100644
index 000000000..06a6a0c7f
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/updater_fixture.yaml
@@ -0,0 +1,64 @@
+update_git_diff_output_without_formulae_changes: |
+ M Library/Homebrew/ARGV+yeast.rb
+ A Library/Homebrew/beer_events.rb
+ A Library/Homebrew/hardware.rb
+ D Library/Homebrew/hw.model.c
+ M README
+ M bin/brew
+update_git_diff_output_with_formulae_changes: |
+ M Library/Contributions/brew_bash_completion.sh
+ A Formula/antiword.rb
+ A Formula/bash-completion.rb
+ A Formula/ddrescue.rb
+ A Formula/dict.rb
+ A Formula/lua.rb
+ M Formula/xar.rb
+ M Formula/yajl.rb
+ M Library/Homebrew/ARGV+yeast.rb
+ M Library/Homebrew/beer_events.rb
+ M Library/Homebrew/hardware.rb
+ M Library/Homebrew/hw.model.c
+ M Library/Homebrew/hw.model.rb
+ M Library/Homebrew/pathname+yeast.rb
+ M Library/Homebrew/unittest.rb
+ M Library/Homebrew/utils.rb
+ M README
+ M bin/brew
+update_git_diff_output_with_removed_formulae: |
+ A Formula/flac123.rb
+ M Formula/gdal.rb
+ M Formula/grass.rb
+ M Formula/json_spirit.rb
+ A Formula/libbson.rb
+ D Formula/libgsasl.rb
+update_git_diff_output_with_changed_filetype: |
+ A Library/ENV/4.3/ant
+ T Library/ENV/4.3/bsdmake
+ M Library/ENV/4.3/make
+ M Formula/elixir.rb
+ A Formula/libbson.rb
+ D Formula/libgsasl.rb
+ M Library/Homebrew/cmd/update.rb
+ M SUPPORTERS.md
+update_git_diff_output_with_formula_rename: |
+ R100 Formula/cv.rb Formula/progress.rb
+update_git_diff_output_with_restructured_tap: |
+ R100 git.rb Formula/git.rb
+ R100 lua.rb Formula/lua.rb
+update_git_diff_output_with_formula_rename_and_restructuring: |
+ R100 xchat.rb Formula/xchat2.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
+ M Requirements/some_requirement.rb
+ D another_ruby_file.rb
+ A a_ruby_file.rb
+ A CONTRIBUTING.md
+ M Formula/git.rb
+ A Formula/lua.rb
+ M lib/not_a_formula.rb
+ A lib/not_a_formula2.rb
+ D lib/not_a_formula3.rb
diff --git a/Library/Homebrew/test/support/helper/env.rb b/Library/Homebrew/test/support/helper/env.rb
new file mode 100644
index 000000000..904a1d4c7
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/env.rb
@@ -0,0 +1,15 @@
+module Test
+ module Helper
+ module Env
+ def with_environment(partial_env)
+ old = ENV.to_hash
+ ENV.update partial_env
+ begin
+ yield
+ ensure
+ ENV.replace old
+ end
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/test/support/helper/integration_command_test_case.rb b/Library/Homebrew/test/support/helper/integration_command_test_case.rb
new file mode 100644
index 000000000..d7ae67423
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/integration_command_test_case.rb
@@ -0,0 +1,200 @@
+require "bundler"
+require "fileutils"
+require "pathname"
+require "formula"
+
+class IntegrationCommandTestCase < Homebrew::TestCase
+ def setup
+ @cmd_id_index = 0 # Assign unique IDs to invocations of `cmd_output`.
+ (HOMEBREW_PREFIX/"bin").mkpath
+ FileUtils.touch HOMEBREW_PREFIX/"bin/brew"
+ end
+
+ def teardown
+ coretap = CoreTap.new
+ paths_to_delete = [
+ HOMEBREW_LINKED_KEGS,
+ HOMEBREW_PINNED_KEGS,
+ HOMEBREW_CELLAR.children,
+ HOMEBREW_CACHE.children,
+ HOMEBREW_LOCK_DIR.children,
+ HOMEBREW_LOGS.children,
+ HOMEBREW_TEMP.children,
+ HOMEBREW_PREFIX/".git",
+ HOMEBREW_PREFIX/"bin",
+ HOMEBREW_PREFIX/"share",
+ HOMEBREW_PREFIX/"opt",
+ HOMEBREW_PREFIX/"Caskroom",
+ HOMEBREW_LIBRARY/"Taps/caskroom",
+ HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-bundle",
+ HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo",
+ HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-services",
+ HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-shallow",
+ HOMEBREW_REPOSITORY/".git",
+ coretap.path/".git",
+ coretap.alias_dir,
+ coretap.formula_dir.children,
+ coretap.path/"formula_renames.json",
+ ].flatten
+ FileUtils.rm_rf paths_to_delete
+ end
+
+ def needs_test_cmd_taps
+ return if ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"]
+ skip "HOMEBREW_TEST_OFFICIAL_CMD_TAPS is not set"
+ end
+
+ def needs_macos
+ skip "Not on MacOS" unless OS.mac?
+ end
+
+ def cmd_id_from_args(args)
+ args_pretty = args.join(" ").gsub(TEST_TMPDIR, "@TMPDIR@")
+ test_pretty = "#{self.class.name}\##{name}.#{@cmd_id_index += 1}"
+ "[#{test_pretty}] brew #{args_pretty}"
+ end
+
+ def cmd_output(*args)
+ # 1.8-compatible way of writing def cmd_output(*args, **env)
+ env = args.last.is_a?(Hash) ? args.pop : {}
+ cmd_args = %W[
+ -W0
+ -I#{HOMEBREW_LIBRARY_PATH}/test/support/lib
+ -rconfig
+ ]
+ if ENV["HOMEBREW_TESTS_COVERAGE"]
+ # This is needed only because we currently use a patched version of
+ # simplecov, and gems installed through git are not available without
+ # requiring bundler/setup first. See also the comment in test/Gemfile.
+ # Remove this line when we'll switch back to a stable simplecov release.
+ cmd_args << "-rbundler/setup"
+ cmd_args << "-rsimplecov"
+ end
+ cmd_args << "-rintegration_mocks"
+ cmd_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
+ cmd_args += args
+ developer = ENV["HOMEBREW_DEVELOPER"]
+ Bundler.with_original_env do
+ ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
+ ENV["HOMEBREW_INTEGRATION_TEST"] = cmd_id_from_args(args)
+ ENV["HOMEBREW_TEST_TMPDIR"] = TEST_TMPDIR
+ ENV["HOMEBREW_DEVELOPER"] = developer
+ env.each_pair do |k, v|
+ ENV[k] = v
+ end
+
+ read, write = IO.pipe
+ begin
+ pid = fork do
+ read.close
+ $stdout.reopen(write)
+ $stderr.reopen(write)
+ write.close
+ exec RUBY_PATH, *cmd_args
+ end
+ write.close
+ read.read.chomp
+ ensure
+ Process.wait(pid)
+ read.close
+ end
+ end
+ end
+
+ def cmd(*args)
+ output = cmd_output(*args)
+ status = $?.exitstatus
+ puts "\n'brew #{args.join " "}' output: #{output}" if status.nonzero?
+ assert_equal 0, status
+ output
+ end
+
+ def cmd_fail(*args)
+ output = cmd_output(*args)
+ status = $?.exitstatus
+ $stderr.puts "\n'brew #{args.join " "}'" if status.zero?
+ refute_equal 0, status
+ output
+ end
+
+ def setup_test_formula(name, content = nil)
+ formula_path = CoreTap.new.formula_dir/"#{name}.rb"
+
+ case name
+ when /^testball/
+ content = <<-EOS.undent
+ desc "Some test"
+ homepage "https://example.com/#{name}"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
+ sha256 "#{TESTBALL_SHA256}"
+
+ option "with-foo", "Build with foo"
+
+ def install
+ (prefix/"foo"/"test").write("test") if build.with? "foo"
+ prefix.install Dir["*"]
+ (buildpath/"test.c").write \
+ "#include \\nint main(){return printf(\\"test\\");}"
+ bin.mkpath
+ system ENV.cc, "test.c", "-o", bin/"test"
+ end
+
+ #{content}
+
+ # something here
+ EOS
+ when "foo"
+ content = <<-EOS.undent
+ url "https://example.com/#{name}-1.0"
+ EOS
+ when "bar"
+ content = <<-EOS.undent
+ url "https://example.com/#{name}-1.0"
+ depends_on "foo"
+ EOS
+ end
+
+ formula_path.write <<-EOS.undent
+ class #{Formulary.class_s(name)} < Formula
+ #{content}
+ end
+ EOS
+
+ formula_path
+ end
+
+ def setup_remote_tap(name)
+ tap = Tap.fetch name
+ tap.install(full_clone: false, quiet: true) unless tap.installed?
+ tap
+ end
+
+ def install_and_rename_coretap_formula(old_name, new_name)
+ core_tap = CoreTap.new
+ core_tap.path.cd do
+ shutup do
+ system "git", "init"
+ system "git", "add", "--all"
+ system "git", "commit", "-m",
+ "#{old_name.capitalize} has not yet been renamed"
+ end
+ end
+
+ cmd("install", old_name)
+ (core_tap.path/"Formula/#{old_name}.rb").unlink
+ formula_renames = core_tap.path/"formula_renames.json"
+ formula_renames.write Utils::JSON.dump(old_name => new_name)
+
+ core_tap.path.cd do
+ shutup do
+ system "git", "add", "--all"
+ system "git", "commit", "-m",
+ "#{old_name.capitalize} has been renamed to #{new_name.capitalize}"
+ end
+ end
+ end
+
+ def testball
+ "#{TEST_FIXTURE_DIR}/testball.rb"
+ end
+end
diff --git a/Library/Homebrew/test/support/helper/shutup.rb b/Library/Homebrew/test/support/helper/shutup.rb
new file mode 100644
index 000000000..fa5f08d31
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/shutup.rb
@@ -0,0 +1,24 @@
+module Test
+ module Helper
+ module Shutup
+ def shutup
+ if ENV.key?("VERBOSE_TESTS")
+ yield
+ else
+ begin
+ tmperr = $stderr.clone
+ tmpout = $stdout.clone
+ $stderr.reopen("/dev/null")
+ $stdout.reopen("/dev/null")
+ yield
+ ensure
+ $stderr.reopen(tmperr)
+ $stdout.reopen(tmpout)
+ tmperr.close
+ tmpout.close
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb
new file mode 100644
index 000000000..f6fdb4ecb
--- /dev/null
+++ b/Library/Homebrew/test/support/lib/config.rb
@@ -0,0 +1,40 @@
+unless ENV["HOMEBREW_BREW_FILE"]
+ raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
+end
+
+require "tmpdir"
+require "pathname"
+
+HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
+
+TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k|
+ dir = Dir.mktmpdir("homebrew-tests-", ENV["HOMEBREW_TEMP"] || "/tmp")
+ at_exit { FileUtils.remove_entry(dir) }
+ ENV[k] = dir
+end
+
+# Paths pointing into the Homebrew code base that persist across test runs
+HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../../..", __FILE__))
+HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims"
+HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
+
+# Paths redirected to a temporary directory and wiped at the end of the test run
+HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix")
+HOMEBREW_REPOSITORY = HOMEBREW_PREFIX
+HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library"
+HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache"
+HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache"
+HOMEBREW_LINKED_KEGS = HOMEBREW_PREFIX.parent+"linked"
+HOMEBREW_PINNED_KEGS = HOMEBREW_PREFIX.parent+"pinned"
+HOMEBREW_LOCK_DIR = HOMEBREW_PREFIX.parent+"locks"
+HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
+HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs"
+HOMEBREW_TEMP = HOMEBREW_PREFIX.parent+"temp"
+
+TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "support", "fixtures")
+
+TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37".freeze
+TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze
+TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9".freeze
+PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa".freeze
+PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b90".freeze
diff --git a/Library/Homebrew/test/support/lib/integration_mocks.rb b/Library/Homebrew/test/support/lib/integration_mocks.rb
new file mode 100644
index 000000000..6effb0cde
--- /dev/null
+++ b/Library/Homebrew/test/support/lib/integration_mocks.rb
@@ -0,0 +1,17 @@
+module Homebrew
+ module Diagnostic
+ class Checks
+ def check_integration_test
+ "This is an integration test" if ENV["HOMEBREW_INTEGRATION_TEST"]
+ end
+ end
+ end
+
+ def exec(*args)
+ if ENV["HOMEBREW_TESTS_COVERAGE"] && ENV["HOMEBREW_INTEGRATION_TEST"]
+ # Ensure we get coverage results before replacing the current process.
+ SimpleCov.result
+ end
+ Kernel.exec(*args)
+ end
+end
diff --git a/Library/Homebrew/test/tarballs/testball-0.1-patches.tgz b/Library/Homebrew/test/tarballs/testball-0.1-patches.tgz
deleted file mode 100644
index 4b43f535e..000000000
Binary files a/Library/Homebrew/test/tarballs/testball-0.1-patches.tgz and /dev/null differ
diff --git a/Library/Homebrew/test/tarballs/testball-0.1.tbz b/Library/Homebrew/test/tarballs/testball-0.1.tbz
deleted file mode 100644
index c7e1af1f4..000000000
Binary files a/Library/Homebrew/test/tarballs/testball-0.1.tbz and /dev/null differ
diff --git a/Library/Homebrew/test/tarballs/testbottest-0.1.tbz b/Library/Homebrew/test/tarballs/testbottest-0.1.tbz
deleted file mode 100644
index 83f7ab1dd..000000000
Binary files a/Library/Homebrew/test/tarballs/testbottest-0.1.tbz and /dev/null differ
diff --git a/Library/Homebrew/test/test/ENV_test.rb b/Library/Homebrew/test/test/ENV_test.rb
index e38c75c6e..1736d34af 100644
--- a/Library/Homebrew/test/test/ENV_test.rb
+++ b/Library/Homebrew/test/test/ENV_test.rb
@@ -1,6 +1,7 @@
require "testing_env"
require "extend/ENV"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestEnv < IntegrationCommandTestCase
def test_env
diff --git a/Library/Homebrew/test/test/analytics_test.rb b/Library/Homebrew/test/test/analytics_test.rb
index 00e0593db..266c5bd09 100644
--- a/Library/Homebrew/test/test/analytics_test.rb
+++ b/Library/Homebrew/test/test/analytics_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestAnalytics < IntegrationCommandTestCase
def test_analytics
diff --git a/Library/Homebrew/test/test/bottle_test.rb b/Library/Homebrew/test/test/bottle_test.rb
index 48727cfd9..5fdba0af8 100644
--- a/Library/Homebrew/test/test/bottle_test.rb
+++ b/Library/Homebrew/test/test/bottle_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestBottle < IntegrationCommandTestCase
def test_bottle
diff --git a/Library/Homebrew/test/test/bundle_test.rb b/Library/Homebrew/test/test/bundle_test.rb
index 6b040df1d..ea18d5f84 100644
--- a/Library/Homebrew/test/test/bundle_test.rb
+++ b/Library/Homebrew/test/test/bundle_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestBundle < IntegrationCommandTestCase
def test_bundle
diff --git a/Library/Homebrew/test/test/cache_formula_test.rb b/Library/Homebrew/test/test/cache_formula_test.rb
index f4e37e2a2..c64ce9809 100644
--- a/Library/Homebrew/test/test/cache_formula_test.rb
+++ b/Library/Homebrew/test/test/cache_formula_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCacheFormula < IntegrationCommandTestCase
def test_cache_formula
diff --git a/Library/Homebrew/test/test/cache_test.rb b/Library/Homebrew/test/test/cache_test.rb
index cd7a5e2fa..f8c035676 100644
--- a/Library/Homebrew/test/test/cache_test.rb
+++ b/Library/Homebrew/test/test/cache_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCache < IntegrationCommandTestCase
def test_cache
diff --git a/Library/Homebrew/test/test/cask_test.rb b/Library/Homebrew/test/test/cask_test.rb
index 6cae6d54b..ad7a2a0a0 100644
--- a/Library/Homebrew/test/test/cask_test.rb
+++ b/Library/Homebrew/test/test/cask_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCask < IntegrationCommandTestCase
def test_cask
diff --git a/Library/Homebrew/test/test/cat_test.rb b/Library/Homebrew/test/test/cat_test.rb
index 4cfd19c3d..df64188d6 100644
--- a/Library/Homebrew/test/test/cat_test.rb
+++ b/Library/Homebrew/test/test/cat_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCat < IntegrationCommandTestCase
def test_cat
diff --git a/Library/Homebrew/test/test/cellar_formula_test.rb b/Library/Homebrew/test/test/cellar_formula_test.rb
index 7c458be9d..6c3063ca3 100644
--- a/Library/Homebrew/test/test/cellar_formula_test.rb
+++ b/Library/Homebrew/test/test/cellar_formula_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCellarFormula < IntegrationCommandTestCase
def test_cellar_formula
diff --git a/Library/Homebrew/test/test/cellar_test.rb b/Library/Homebrew/test/test/cellar_test.rb
index b793c5342..32cdb1af5 100644
--- a/Library/Homebrew/test/test/cellar_test.rb
+++ b/Library/Homebrew/test/test/cellar_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCellar < IntegrationCommandTestCase
def test_cellar
diff --git a/Library/Homebrew/test/test/checksum_verification_test.rb b/Library/Homebrew/test/test/checksum_verification_test.rb
index e25d08b83..9017b528d 100644
--- a/Library/Homebrew/test/test/checksum_verification_test.rb
+++ b/Library/Homebrew/test/test/checksum_verification_test.rb
@@ -12,7 +12,7 @@ class ChecksumVerificationTests < Homebrew::TestCase
def formula(&block)
super do
- url "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
instance_eval(&block)
end
end
diff --git a/Library/Homebrew/test/test/cleaner_test.rb b/Library/Homebrew/test/test/cleaner_test.rb
index 450a78d86..ac108421c 100644
--- a/Library/Homebrew/test/test/cleaner_test.rb
+++ b/Library/Homebrew/test/test/cleaner_test.rb
@@ -17,8 +17,8 @@ class CleanerTests < Homebrew::TestCase
def test_clean_file
@f.bin.mkpath
@f.lib.mkpath
- cp "#{TEST_DIRECTORY}/mach/a.out", @f.bin
- cp Dir["#{TEST_DIRECTORY}/mach/*.dylib"], @f.lib
+ cp "#{TEST_FIXTURE_DIR}/mach/a.out", @f.bin
+ cp Dir["#{TEST_FIXTURE_DIR}/mach/*.dylib"], @f.lib
Cleaner.new(@f).clean
diff --git a/Library/Homebrew/test/test/cleanup_test.rb b/Library/Homebrew/test/test/cleanup_test.rb
index dffcd12f2..fef249fcb 100644
--- a/Library/Homebrew/test/test/cleanup_test.rb
+++ b/Library/Homebrew/test/test/cleanup_test.rb
@@ -1,9 +1,10 @@
require "testing_env"
-require "testball"
+require "test/support/fixtures/testball"
require "cleanup"
require "fileutils"
require "pathname"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCleanup < IntegrationCommandTestCase
def test_cleanup
diff --git a/Library/Homebrew/test/test/command_test.rb b/Library/Homebrew/test/test/command_test.rb
index d05184631..620a014b9 100644
--- a/Library/Homebrew/test/test/command_test.rb
+++ b/Library/Homebrew/test/test/command_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCommand < IntegrationCommandTestCase
def test_command
diff --git a/Library/Homebrew/test/test/commands_test.rb b/Library/Homebrew/test/test/commands_test.rb
index ef138049c..cbb446ae3 100644
--- a/Library/Homebrew/test/test/commands_test.rb
+++ b/Library/Homebrew/test/test/commands_test.rb
@@ -2,7 +2,8 @@ require "testing_env"
require "cmd/command"
require "cmd/commands"
require "fileutils"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCommands < IntegrationCommandTestCase
def test_commands
diff --git a/Library/Homebrew/test/test/config_test.rb b/Library/Homebrew/test/test/config_test.rb
index 33a293735..1a793cc6b 100644
--- a/Library/Homebrew/test/test/config_test.rb
+++ b/Library/Homebrew/test/test/config_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestConfig < IntegrationCommandTestCase
def test_config
diff --git a/Library/Homebrew/test/test/create_test.rb b/Library/Homebrew/test/test/create_test.rb
index 5f194ea02..26a325a22 100644
--- a/Library/Homebrew/test/test/create_test.rb
+++ b/Library/Homebrew/test/test/create_test.rb
@@ -1,8 +1,9 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCreate < IntegrationCommandTestCase
def test_create
- url = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"
+ url = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
cmd("create", url, "HOMEBREW_EDITOR" => "/bin/cat")
formula_file = CoreTap.new.formula_dir/"testball.rb"
diff --git a/Library/Homebrew/test/test/custom_command_test.rb b/Library/Homebrew/test/test/custom_command_test.rb
index bc27e2121..71bfafd9b 100644
--- a/Library/Homebrew/test/test/custom_command_test.rb
+++ b/Library/Homebrew/test/test/custom_command_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestCustomCommand < IntegrationCommandTestCase
def test_custom_command
diff --git a/Library/Homebrew/test/test/deps_test.rb b/Library/Homebrew/test/test/deps_test.rb
index 83cc9aa6a..44803af5e 100644
--- a/Library/Homebrew/test/test/deps_test.rb
+++ b/Library/Homebrew/test/test/deps_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestDeps < IntegrationCommandTestCase
def test_deps
diff --git a/Library/Homebrew/test/test/desc_test.rb b/Library/Homebrew/test/test/desc_test.rb
index 075ea991a..7428c0792 100644
--- a/Library/Homebrew/test/test/desc_test.rb
+++ b/Library/Homebrew/test/test/desc_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestDesc < IntegrationCommandTestCase
def test_desc
diff --git a/Library/Homebrew/test/test/doctor_test.rb b/Library/Homebrew/test/test/doctor_test.rb
index ccb909dce..be1098d22 100644
--- a/Library/Homebrew/test/test/doctor_test.rb
+++ b/Library/Homebrew/test/test/doctor_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestDoctor < IntegrationCommandTestCase
def test_doctor
diff --git a/Library/Homebrew/test/test/edit_test.rb b/Library/Homebrew/test/test/edit_test.rb
index 8d1437173..c78db3bd8 100644
--- a/Library/Homebrew/test/test/edit_test.rb
+++ b/Library/Homebrew/test/test/edit_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestEdit < IntegrationCommandTestCase
def test_edit
diff --git a/Library/Homebrew/test/test/fetch_test.rb b/Library/Homebrew/test/test/fetch_test.rb
index 7b57c6246..e049db554 100644
--- a/Library/Homebrew/test/test/fetch_test.rb
+++ b/Library/Homebrew/test/test/fetch_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestFetch < IntegrationCommandTestCase
def test_fetch
diff --git a/Library/Homebrew/test/test/formula_installer_bottle_test.rb b/Library/Homebrew/test/test/formula_installer_bottle_test.rb
index d83c856b7..6a891f159 100644
--- a/Library/Homebrew/test/test/formula_installer_bottle_test.rb
+++ b/Library/Homebrew/test/test/formula_installer_bottle_test.rb
@@ -3,8 +3,8 @@ require "formula"
require "formula_installer"
require "keg"
require "tab"
-require "testball"
-require "testball_bottle"
+require "test/support/fixtures/testball"
+require "test/support/fixtures/testball_bottle"
class InstallBottleTests < Homebrew::TestCase
def temporary_bottle_install(formula)
diff --git a/Library/Homebrew/test/test/formula_installer_test.rb b/Library/Homebrew/test/test/formula_installer_test.rb
index 18bd910a6..652548bd7 100644
--- a/Library/Homebrew/test/test/formula_installer_test.rb
+++ b/Library/Homebrew/test/test/formula_installer_test.rb
@@ -3,8 +3,8 @@ require "formula"
require "formula_installer"
require "keg"
require "tab"
-require "testball"
-require "testball_bottle"
+require "test/support/fixtures/testball"
+require "test/support/fixtures/testball_bottle"
class InstallTests < Homebrew::TestCase
def temporary_install(formula)
diff --git a/Library/Homebrew/test/test/formula_test.rb b/Library/Homebrew/test/test/formula_test.rb
index 4aa835590..eef60a3e5 100644
--- a/Library/Homebrew/test/test/formula_test.rb
+++ b/Library/Homebrew/test/test/formula_test.rb
@@ -1,5 +1,5 @@
require "testing_env"
-require "testball"
+require "test/support/fixtures/testball"
require "formula"
class FormulaTests < Homebrew::TestCase
diff --git a/Library/Homebrew/test/test/formulary_test.rb b/Library/Homebrew/test/test/formulary_test.rb
index 690ff089a..3d88c8407 100644
--- a/Library/Homebrew/test/test/formulary_test.rb
+++ b/Library/Homebrew/test/test/formulary_test.rb
@@ -18,11 +18,11 @@ class FormularyFactoryTest < Homebrew::TestCase
def setup
@name = "testball_bottle"
@path = CoreTap.new.formula_dir/"#{@name}.rb"
- @bottle_dir = Pathname.new("#{TEST_DIRECTORY}/bottles")
+ @bottle_dir = Pathname.new("#{TEST_FIXTURE_DIR}/bottles")
@bottle = @bottle_dir/"testball_bottle-0.1.#{Utils::Bottles.tag}.bottle.tar.gz"
@path.write <<-EOS.undent
class #{Formulary.class_s(@name)} < Formula
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
sha256 TESTBALL_SHA256
bottle do
diff --git a/Library/Homebrew/test/test/help_test.rb b/Library/Homebrew/test/test/help_test.rb
index 9c14f9b78..8c9a4bb08 100644
--- a/Library/Homebrew/test/test/help_test.rb
+++ b/Library/Homebrew/test/test/help_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestHelp < IntegrationCommandTestCase
def test_help
diff --git a/Library/Homebrew/test/test/home_test.rb b/Library/Homebrew/test/test/home_test.rb
index 9c26353be..9116442b7 100644
--- a/Library/Homebrew/test/test/home_test.rb
+++ b/Library/Homebrew/test/test/home_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestHome < IntegrationCommandTestCase
def test_home
diff --git a/Library/Homebrew/test/test/info_test.rb b/Library/Homebrew/test/test/info_test.rb
index 35f9183e1..a4186a5e9 100644
--- a/Library/Homebrew/test/test/info_test.rb
+++ b/Library/Homebrew/test/test/info_test.rb
@@ -1,7 +1,8 @@
require "testing_env"
require "cmd/info"
require "formula"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestInfo < IntegrationCommandTestCase
def test_info
diff --git a/Library/Homebrew/test/test/install_test.rb b/Library/Homebrew/test/test/install_test.rb
index 7135dddb2..313125931 100644
--- a/Library/Homebrew/test/test/install_test.rb
+++ b/Library/Homebrew/test/test/install_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestInstall < IntegrationCommandTestCase
def test_install
diff --git a/Library/Homebrew/test/test/irb_test.rb b/Library/Homebrew/test/test/irb_test.rb
index bf35b6524..77ca4a90d 100644
--- a/Library/Homebrew/test/test/irb_test.rb
+++ b/Library/Homebrew/test/test/irb_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestIrb < IntegrationCommandTestCase
def test_irb
diff --git a/Library/Homebrew/test/test/leaves_test.rb b/Library/Homebrew/test/test/leaves_test.rb
index 2a9bbadd9..ef25a4b6e 100644
--- a/Library/Homebrew/test/test/leaves_test.rb
+++ b/Library/Homebrew/test/test/leaves_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestLeaves < IntegrationCommandTestCase
def test_leaves
diff --git a/Library/Homebrew/test/test/link_test.rb b/Library/Homebrew/test/test/link_test.rb
index 3f0507072..ecabe0c67 100644
--- a/Library/Homebrew/test/test/link_test.rb
+++ b/Library/Homebrew/test/test/link_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestLink < IntegrationCommandTestCase
def test_link
diff --git a/Library/Homebrew/test/test/linkapps_test.rb b/Library/Homebrew/test/test/linkapps_test.rb
index b7c4cb811..a0b33a543 100644
--- a/Library/Homebrew/test/test/linkapps_test.rb
+++ b/Library/Homebrew/test/test/linkapps_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestLinkapps < IntegrationCommandTestCase
def test_linkapps
diff --git a/Library/Homebrew/test/test/list_test.rb b/Library/Homebrew/test/test/list_test.rb
index 1ffdb4528..26aab741f 100644
--- a/Library/Homebrew/test/test/list_test.rb
+++ b/Library/Homebrew/test/test/list_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestList < IntegrationCommandTestCase
def test_list
diff --git a/Library/Homebrew/test/test/log_formula_test.rb b/Library/Homebrew/test/test/log_formula_test.rb
index 34509bf72..26c10d381 100644
--- a/Library/Homebrew/test/test/log_formula_test.rb
+++ b/Library/Homebrew/test/test/log_formula_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestLogFormula < IntegrationCommandTestCase
def test_log_formula
diff --git a/Library/Homebrew/test/test/log_test.rb b/Library/Homebrew/test/test/log_test.rb
index b20a098fd..c9eb73d97 100644
--- a/Library/Homebrew/test/test/log_test.rb
+++ b/Library/Homebrew/test/test/log_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestLog < IntegrationCommandTestCase
def test_log
diff --git a/Library/Homebrew/test/test/migrate_test.rb b/Library/Homebrew/test/test/migrate_test.rb
index 53b32777a..c267629a3 100644
--- a/Library/Homebrew/test/test/migrate_test.rb
+++ b/Library/Homebrew/test/test/migrate_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestMigrate < IntegrationCommandTestCase
def test_migrate
diff --git a/Library/Homebrew/test/test/migrator_test.rb b/Library/Homebrew/test/test/migrator_test.rb
index cefb8b7a3..8a2b6ad63 100644
--- a/Library/Homebrew/test/test/migrator_test.rb
+++ b/Library/Homebrew/test/test/migrator_test.rb
@@ -1,6 +1,6 @@
require "testing_env"
require "migrator"
-require "testball"
+require "test/support/fixtures/testball"
require "tab"
require "keg"
diff --git a/Library/Homebrew/test/test/missing_test.rb b/Library/Homebrew/test/test/missing_test.rb
index 565f413da..9ad0ab0b8 100644
--- a/Library/Homebrew/test/test/missing_test.rb
+++ b/Library/Homebrew/test/test/missing_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestMissing < IntegrationCommandTestCase
def setup
diff --git a/Library/Homebrew/test/test/options_test.rb b/Library/Homebrew/test/test/options_test.rb
index bfde7a9b6..43ea26b97 100644
--- a/Library/Homebrew/test/test/options_test.rb
+++ b/Library/Homebrew/test/test/options_test.rb
@@ -1,6 +1,7 @@
require "testing_env"
require "options"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestOptions < IntegrationCommandTestCase
def test_options
diff --git a/Library/Homebrew/test/test/os/mac/mach_test.rb b/Library/Homebrew/test/test/os/mac/mach_test.rb
index 404a21d60..a42f7316b 100644
--- a/Library/Homebrew/test/test/os/mac/mach_test.rb
+++ b/Library/Homebrew/test/test/os/mac/mach_test.rb
@@ -41,7 +41,7 @@ class MachOPathnameTests < Homebrew::TestCase
end
def test_mach_o_executable
- pn = Pathname.new("#{TEST_DIRECTORY}/mach/a.out")
+ pn = Pathname.new("#{TEST_FIXTURE_DIR}/mach/a.out")
assert_predicate pn, :universal?
refute_predicate pn, :i386?
refute_predicate pn, :x86_64?
@@ -93,7 +93,7 @@ class MachOPathnameTests < Homebrew::TestCase
end
def test_non_mach_o
- pn = Pathname.new("#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz")
+ pn = Pathname.new("#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz")
refute_predicate pn, :universal?
refute_predicate pn, :i386?
refute_predicate pn, :x86_64?
diff --git a/Library/Homebrew/test/test/outdated_test.rb b/Library/Homebrew/test/test/outdated_test.rb
index cc0f024c8..03c2293d8 100644
--- a/Library/Homebrew/test/test/outdated_test.rb
+++ b/Library/Homebrew/test/test/outdated_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestOutdated < IntegrationCommandTestCase
def test_outdated
diff --git a/Library/Homebrew/test/test/patching_test.rb b/Library/Homebrew/test/test/patching_test.rb
index 18b848b10..ac14c8e1e 100644
--- a/Library/Homebrew/test/test/patching_test.rb
+++ b/Library/Homebrew/test/test/patching_test.rb
@@ -2,12 +2,12 @@ require "testing_env"
require "formula"
class PatchingTests < Homebrew::TestCase
- TESTBALL_URL = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz".freeze
- TESTBALL_PATCHES_URL = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1-patches.tgz".freeze
- PATCH_URL_A = "file://#{TEST_DIRECTORY}/patches/noop-a.diff".freeze
- PATCH_URL_B = "file://#{TEST_DIRECTORY}/patches/noop-b.diff".freeze
- PATCH_A_CONTENTS = File.read "#{TEST_DIRECTORY}/patches/noop-a.diff"
- PATCH_B_CONTENTS = File.read "#{TEST_DIRECTORY}/patches/noop-b.diff"
+ TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz".freeze
+ TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz".freeze
+ PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff".freeze
+ PATCH_URL_B = "file://#{TEST_FIXTURE_DIR}/patches/noop-b.diff".freeze
+ PATCH_A_CONTENTS = File.read "#{TEST_FIXTURE_DIR}/patches/noop-a.diff"
+ PATCH_B_CONTENTS = File.read "#{TEST_FIXTURE_DIR}/patches/noop-b.diff"
APPLY_A = "noop-a.diff".freeze
APPLY_B = "noop-b.diff".freeze
APPLY_C = "noop-c.diff".freeze
diff --git a/Library/Homebrew/test/test/pin_unpin_test.rb b/Library/Homebrew/test/test/pin_unpin_test.rb
index 37682d45e..9603620a3 100644
--- a/Library/Homebrew/test/test/pin_unpin_test.rb
+++ b/Library/Homebrew/test/test/pin_unpin_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPinUnpin < IntegrationCommandTestCase
def test_pin_unpin
diff --git a/Library/Homebrew/test/test/prefix_formula_test.rb b/Library/Homebrew/test/test/prefix_formula_test.rb
index d76a966d7..e51de2b6f 100644
--- a/Library/Homebrew/test/test/prefix_formula_test.rb
+++ b/Library/Homebrew/test/test/prefix_formula_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPrefixFormula < IntegrationCommandTestCase
def test_prefix_formula
diff --git a/Library/Homebrew/test/test/prefix_test.rb b/Library/Homebrew/test/test/prefix_test.rb
index 4aa63fa07..1b2114807 100644
--- a/Library/Homebrew/test/test/prefix_test.rb
+++ b/Library/Homebrew/test/test/prefix_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPrefix < IntegrationCommandTestCase
def test_prefix
diff --git a/Library/Homebrew/test/test/prune_test.rb b/Library/Homebrew/test/test/prune_test.rb
index 293a3746d..b81062112 100644
--- a/Library/Homebrew/test/test/prune_test.rb
+++ b/Library/Homebrew/test/test/prune_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPrune < IntegrationCommandTestCase
def test_prune
diff --git a/Library/Homebrew/test/test/pull_offline_test.rb b/Library/Homebrew/test/test/pull_offline_test.rb
index 2716af346..1429ca62e 100644
--- a/Library/Homebrew/test/test/pull_offline_test.rb
+++ b/Library/Homebrew/test/test/pull_offline_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPullOffline < IntegrationCommandTestCase
def test_pull_offline
diff --git a/Library/Homebrew/test/test/pull_test.rb b/Library/Homebrew/test/test/pull_test.rb
index 9707ff8a8..f772454ba 100644
--- a/Library/Homebrew/test/test/pull_test.rb
+++ b/Library/Homebrew/test/test/pull_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestPull < IntegrationCommandTestCase
def test_pull
diff --git a/Library/Homebrew/test/test/readall_test.rb b/Library/Homebrew/test/test/readall_test.rb
index d0c078e49..cbb304ca1 100644
--- a/Library/Homebrew/test/test/readall_test.rb
+++ b/Library/Homebrew/test/test/readall_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestReadall < IntegrationCommandTestCase
def test_readall
diff --git a/Library/Homebrew/test/test/reinstall_pinned_test.rb b/Library/Homebrew/test/test/reinstall_pinned_test.rb
index c9cb8a849..36f5cfd74 100644
--- a/Library/Homebrew/test/test/reinstall_pinned_test.rb
+++ b/Library/Homebrew/test/test/reinstall_pinned_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestReinstallPinned < IntegrationCommandTestCase
def test_reinstall_pinned
diff --git a/Library/Homebrew/test/test/reinstall_test.rb b/Library/Homebrew/test/test/reinstall_test.rb
index d07a96051..501830102 100644
--- a/Library/Homebrew/test/test/reinstall_test.rb
+++ b/Library/Homebrew/test/test/reinstall_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestReinstall < IntegrationCommandTestCase
def test_reinstall
diff --git a/Library/Homebrew/test/test/repository_test.rb b/Library/Homebrew/test/test/repository_test.rb
index 2029876ad..352ab1d42 100644
--- a/Library/Homebrew/test/test/repository_test.rb
+++ b/Library/Homebrew/test/test/repository_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestRepository < IntegrationCommandTestCase
def test_repository
diff --git a/Library/Homebrew/test/test/search_test.rb b/Library/Homebrew/test/test/search_test.rb
index 8310d1c2b..95e555bf2 100644
--- a/Library/Homebrew/test/test/search_test.rb
+++ b/Library/Homebrew/test/test/search_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestSearch < IntegrationCommandTestCase
def test_search
diff --git a/Library/Homebrew/test/test/services_test.rb b/Library/Homebrew/test/test/services_test.rb
index b5ccb7c77..94fba4675 100644
--- a/Library/Homebrew/test/test/services_test.rb
+++ b/Library/Homebrew/test/test/services_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestServices < IntegrationCommandTestCase
def test_services
diff --git a/Library/Homebrew/test/test/sh_test.rb b/Library/Homebrew/test/test/sh_test.rb
index 449b7b5b3..67593b17e 100644
--- a/Library/Homebrew/test/test/sh_test.rb
+++ b/Library/Homebrew/test/test/sh_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestSh < IntegrationCommandTestCase
def test_sh
diff --git a/Library/Homebrew/test/test/switch_test.rb b/Library/Homebrew/test/test/switch_test.rb
index 88fdf85b9..766d24494 100644
--- a/Library/Homebrew/test/test/switch_test.rb
+++ b/Library/Homebrew/test/test/switch_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestSwitch < IntegrationCommandTestCase
def test_switch
diff --git a/Library/Homebrew/test/test/tab_test.rb b/Library/Homebrew/test/test/tab_test.rb
index 2c756cf68..76c9aacc9 100644
--- a/Library/Homebrew/test/test/tab_test.rb
+++ b/Library/Homebrew/test/test/tab_test.rb
@@ -218,7 +218,7 @@ class TabLoadingTests < Homebrew::TestCase
@f = formula { url "foo-1.0" }
@f.prefix.mkpath
@path = @f.prefix.join(Tab::FILENAME)
- @path.write Pathname.new(TEST_DIRECTORY).join("fixtures", "receipt.json").read
+ @path.write TEST_FIXTURE_DIR.join("receipt.json").read
end
def teardown
diff --git a/Library/Homebrew/test/test/tap_new_test.rb b/Library/Homebrew/test/test/tap_new_test.rb
index 636024b0a..57ad4a08e 100644
--- a/Library/Homebrew/test/test/tap_new_test.rb
+++ b/Library/Homebrew/test/test/tap_new_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestTapNew < IntegrationCommandTestCase
def test_tap_readme
diff --git a/Library/Homebrew/test/test/tap_test.rb b/Library/Homebrew/test/test/tap_test.rb
index 71836aee9..94597cdb3 100644
--- a/Library/Homebrew/test/test/tap_test.rb
+++ b/Library/Homebrew/test/test/tap_test.rb
@@ -1,5 +1,6 @@
require "testing_env"
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestTap < IntegrationCommandTestCase
def test_tap
diff --git a/Library/Homebrew/test/test/test_formula_test.rb b/Library/Homebrew/test/test/test_formula_test.rb
index b3889d6a2..cab4db740 100644
--- a/Library/Homebrew/test/test/test_formula_test.rb
+++ b/Library/Homebrew/test/test/test_formula_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestTestFormula < IntegrationCommandTestCase
def test_test_formula
@@ -13,7 +14,7 @@ class IntegrationCommandTestTestFormula < IntegrationCommandTestCase
head "https://github.com/example/testball2.git"
devel do
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
sha256 "#{TESTBALL_SHA256}"
end
diff --git a/Library/Homebrew/test/test/uninstall_test.rb b/Library/Homebrew/test/test/uninstall_test.rb
index d86db0e80..ffc6f0db7 100644
--- a/Library/Homebrew/test/test/uninstall_test.rb
+++ b/Library/Homebrew/test/test/uninstall_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "test/support/helper/integration_command_test_case"
require "cmd/uninstall"
class UninstallTests < Homebrew::TestCase
diff --git a/Library/Homebrew/test/test/unlink_test.rb b/Library/Homebrew/test/test/unlink_test.rb
index 091bd8c45..a307dc638 100644
--- a/Library/Homebrew/test/test/unlink_test.rb
+++ b/Library/Homebrew/test/test/unlink_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestUnlink < IntegrationCommandTestCase
def test_unlink
diff --git a/Library/Homebrew/test/test/unlinkapps_test.rb b/Library/Homebrew/test/test/unlinkapps_test.rb
index 2de4e3ff8..2dbbd84e9 100644
--- a/Library/Homebrew/test/test/unlinkapps_test.rb
+++ b/Library/Homebrew/test/test/unlinkapps_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestUnlinkapps < IntegrationCommandTestCase
def test_unlinkapps
diff --git a/Library/Homebrew/test/test/unpack_test.rb b/Library/Homebrew/test/test/unpack_test.rb
index de1452a29..e044e713b 100644
--- a/Library/Homebrew/test/test/unpack_test.rb
+++ b/Library/Homebrew/test/test/unpack_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestUnpack < IntegrationCommandTestCase
def test_unpack
diff --git a/Library/Homebrew/test/test/upgrade_test.rb b/Library/Homebrew/test/test/upgrade_test.rb
index 73618293b..7c74ca70e 100644
--- a/Library/Homebrew/test/test/upgrade_test.rb
+++ b/Library/Homebrew/test/test/upgrade_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestUpgrade < IntegrationCommandTestCase
def test_upgrade
diff --git a/Library/Homebrew/test/test/uses_test.rb b/Library/Homebrew/test/test/uses_test.rb
index b0e79ef2d..494ce4d6e 100644
--- a/Library/Homebrew/test/test/uses_test.rb
+++ b/Library/Homebrew/test/test/uses_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestUses < IntegrationCommandTestCase
def test_uses
diff --git a/Library/Homebrew/test/test/version_test.rb b/Library/Homebrew/test/test/version_test.rb
index ca37e3567..a783eda69 100644
--- a/Library/Homebrew/test/test/version_test.rb
+++ b/Library/Homebrew/test/test/version_test.rb
@@ -1,4 +1,5 @@
-require "helper/integration_command_test_case"
+require "testing_env"
+require "test/support/helper/integration_command_test_case"
class IntegrationCommandTestVersion < IntegrationCommandTestCase
def test_version
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
deleted file mode 100644
index cce09738d..000000000
--- a/Library/Homebrew/test/testball.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class Testball < Formula
- def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
- self.class.instance_eval do
- stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
- stable.sha256 TESTBALL_SHA256
- end
- super
- end
-
- def install
- prefix.install "bin"
- prefix.install "libexec"
- Dir.chdir "doc"
- end
-end
diff --git a/Library/Homebrew/test/testball_bottle.rb b/Library/Homebrew/test/testball_bottle.rb
deleted file mode 100644
index 769f615aa..000000000
--- a/Library/Homebrew/test/testball_bottle.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class TestballBottle < Formula
- def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
- self.class.instance_eval do
- stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
- stable.sha256 TESTBALL_SHA256
- stable.bottle do
- cellar :any_skip_relocation
- root_url "file://#{File.expand_path("..", __FILE__)}/bottles"
- sha256 "9abc8ce779067e26556002c4ca6b9427b9874d25f0cafa7028e05b5c5c410cb4" => Utils::Bottles.tag
- end
- cxxstdlib_check :skip
- end
- super
- end
-
- def install
- prefix.install "bin"
- prefix.install "libexec"
- end
-end
diff --git a/Library/Homebrew/test/testbottest.rb b/Library/Homebrew/test/testbottest.rb
deleted file mode 100644
index f7695cab5..000000000
--- a/Library/Homebrew/test/testbottest.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class Testbottest < Formula
- desc "Minimal C program and Makefile used for testing Homebrew."
- homepage "https://github.com/Homebrew/brew"
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testbottest-0.1.tbz"
- sha256 "78b54d8f31585c9773bed12b4aa4ab2ce458ebd044b9406cb24d40aa5107f082"
-
- def install
- system "make", "install", "PREFIX=#{prefix}"
- end
-
- test do
- assert_equal "testbottest\n", shell_output("#{bin}/testbottest")
- end
-end
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb
index d441b4f1c..76b943164 100644
--- a/Library/Homebrew/test/testing_env.rb
+++ b/Library/Homebrew/test/testing_env.rb
@@ -1,5 +1,5 @@
$:.unshift File.expand_path("../..", __FILE__)
-$:.unshift File.expand_path("../lib", __FILE__)
+$:.unshift File.expand_path("../support/lib", __FILE__)
require "simplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
require "global"
@@ -9,9 +9,6 @@ require "formulary"
(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-core/Formula").mkpath
%w[cache formula_cache locks cellar logs temp].each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath }
-# Test fixtures and files can be found relative to this path
-TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__))
-
begin
require "rubygems"
require "minitest/autorun"
@@ -43,7 +40,9 @@ module Homebrew
module FSLeakLogger
def self.included(klass)
require "find"
- @@log = File.open(HOMEBREW_LIBRARY_PATH/"tmp/fs_leak.log", "w")
+ logdir = HOMEBREW_LIBRARY_PATH.join("tmp")
+ logdir.mkdir unless logdir.directory?
+ @@log = File.open(logdir.join("fs_leak.log"), "w")
klass.make_my_diffs_pretty!
end
@@ -63,8 +62,8 @@ module Homebrew
end
class TestCase < ::Minitest::Test
- require "test/helper/env"
- require "test/helper/shutup"
+ require "test/support/helper/env"
+ require "test/support/helper/shutup"
include Test::Helper::Env
include Test::Helper::Shutup
@@ -107,11 +106,11 @@ module Homebrew
end
def dylib_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
+ Pathname.new("#{TEST_FIXTURE_DIR}/mach/#{name}.dylib")
end
def bundle_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
+ Pathname.new("#{TEST_FIXTURE_DIR}/mach/#{name}.bundle")
end
# Use a stubbed {Formulary::FormulaLoader} to make a given formula be found
--
cgit v1.2.3