aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/support
diff options
context:
space:
mode:
authorMarkus Reiter2017-11-03 13:23:08 +0100
committerGitHub2017-11-03 13:23:08 +0100
commit4eeac6f884a72bd16ddbab03db22f293e18f02bc (patch)
treeea452fbb6bbce34c08176f59987cdaf93a2cf0e8 /Library/Homebrew/test/support
parent0ac55875c5bd80687e7418995d6d9a485a8c032f (diff)
parenteaae7f3a5b7dcce0d6c4a3238547996e886b7144 (diff)
downloadbrew-4eeac6f884a72bd16ddbab03db22f293e18f02bc.tar.bz2
Merge pull request #3389 from amyspark/hacktoberfest-single-zap
Check that a single uninstall_* and zap stanza is defined
Diffstat (limited to 'Library/Homebrew/test/support')
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb15
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb12
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb15
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb12
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-multi.rb13
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb15
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb12
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb15
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb12
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-multi.rb13
10 files changed, 134 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..6d0d64798
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight-multi.rb
@@ -0,0 +1,15 @@
+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..295a2534e
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb
@@ -0,0 +1,12 @@
+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..d45480fac
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight-multi.rb
@@ -0,0 +1,15 @@
+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..d7d1bef06
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-preflight.rb
@@ -0,0 +1,12 @@
+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..58f096061
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight-multi.rb
@@ -0,0 +1,15 @@
+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..4beffe489
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb
@@ -0,0 +1,12 @@
+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..f671da64f
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight-multi.rb
@@ -0,0 +1,15 @@
+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..2978ed527
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-preflight.rb
@@ -0,0 +1,12 @@
+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