aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/missing_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/missing_test.rb')
-rw-r--r--Library/Homebrew/test/missing_test.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Homebrew/test/missing_test.rb b/Library/Homebrew/test/missing_test.rb
new file mode 100644
index 000000000..4f20d8a7a
--- /dev/null
+++ b/Library/Homebrew/test/missing_test.rb
@@ -0,0 +1,34 @@
+require "testing_env"
+
+class IntegrationCommandTestMissing < IntegrationCommandTestCase
+ def setup
+ super
+
+ setup_test_formula "foo"
+ setup_test_formula "bar"
+ end
+
+ def make_prefix(name)
+ (HOMEBREW_CELLAR/name/"1.0").mkpath
+ end
+
+ def test_missing_missing
+ make_prefix "bar"
+
+ assert_match "foo", cmd("missing")
+ end
+
+ def test_missing_not_missing
+ make_prefix "foo"
+ make_prefix "bar"
+
+ assert_empty cmd("missing")
+ end
+
+ def test_missing_hide
+ make_prefix "foo"
+ make_prefix "bar"
+
+ assert_match "foo", cmd("missing", "--hide=foo")
+ end
+end