diff options
| author | L. E. Segovia | 2017-10-30 20:47:40 -0300 |
|---|---|---|
| committer | L. E. Segovia | 2017-10-30 20:47:40 -0300 |
| commit | 917c138eeb4af0cee212f94edc425512dfbade99 (patch) | |
| tree | 13b852c4ba609d164628572d73e76b0ab69e4d10 /Library/Homebrew/test/support | |
| parent | 9b6b0bfed7f0ebf461d21dba9ba12ad340e20508 (diff) | |
| download | brew-917c138eeb4af0cee212f94edc425512dfbade99.tar.bz2 | |
Add tests for uninstall_* and zap stanzas
Diffstat (limited to 'Library/Homebrew/test/support')
10 files changed, 122 insertions, 0 deletions
diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb new file mode 100644 index 000000000..edbb9aff9 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb @@ -0,0 +1,13 @@ +cask 'with-postflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + postflight do end + + postflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb new file mode 100644 index 000000000..b680f8c44 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb @@ -0,0 +1,11 @@ +cask 'with-postflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + postflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb new file mode 100644 index 000000000..b7505f7f5 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb @@ -0,0 +1,13 @@ +cask 'with-preflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + preflight do end + + preflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb new file mode 100644 index 000000000..bdb0f6145 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb @@ -0,0 +1,11 @@ +cask 'with-preflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + preflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-multi.rb new file mode 100644 index 000000000..e4c2e22e1 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-multi.rb @@ -0,0 +1,13 @@ +cask 'with-uninstall-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall rmdir: "#{TEST_TMPDIR}/empty_directory_path" + + uninstall delete: "#{TEST_TMPDIR}/empty_directory_path" +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb new file mode 100644 index 000000000..389d9991c --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb @@ -0,0 +1,13 @@ +cask 'with-uninstall-postflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_postflight do end + + uninstall_postflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb new file mode 100644 index 000000000..adb894a15 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb @@ -0,0 +1,11 @@ +cask 'with-uninstall-postflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_postflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb new file mode 100644 index 000000000..22c1628c1 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb @@ -0,0 +1,13 @@ +cask 'with-uninstall-preflight-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_preflight do end + + uninstall_preflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb new file mode 100644 index 000000000..5510f4234 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb @@ -0,0 +1,11 @@ +cask 'with-uninstall-preflight' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + uninstall_preflight do end +end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-multi.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-multi.rb new file mode 100644 index 000000000..775e106b4 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-multi.rb @@ -0,0 +1,13 @@ +cask 'with-zap-multi' do + version '1.2.3' + sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip" + homepage 'http://example.com/fancy-pkg' + + pkg 'MyFancyPkg/Fancy.pkg' + + zap rmdir: "#{TEST_TMPDIR}/empty_directory_path" + + zap delete: "#{TEST_TMPDIR}/empty_directory_path" +end |
