aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-08-28 22:11:08 -0500
committerJack Nagel2014-08-28 22:11:08 -0500
commit1ae9bb4d7399618fed9be0a569d7bc9ffc492daf (patch)
tree9c4c929348805f14feab3725c5e098323311f10d /Library/Homebrew/test
parente9e508a4cea497b616cd263d1060ddb2fd56f955 (diff)
downloadhomebrew-1ae9bb4d7399618fed9be0a569d7bc9ffc492daf.tar.bz2
Implement ARGV.named in terms of ARGV.options_only
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_ARGV.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_ARGV.rb b/Library/Homebrew/test/test_ARGV.rb
index 6d2c19f53..7403acf7c 100644
--- a/Library/Homebrew/test/test_ARGV.rb
+++ b/Library/Homebrew/test/test_ARGV.rb
@@ -21,8 +21,13 @@ class ArgvExtensionTests < Homebrew::TestCase
end
def test_argv_named
- @argv << 'mxcl' << '--debug' << '-v'
- assert_equal 1, @argv.named.length
+ @argv << "foo" << "--debug" << "-v"
+ assert_equal %w[foo], @argv.named
+ end
+
+ def test_options_only
+ @argv << "--foo" << "-vds" << "a" << "b" << "cdefg"
+ assert_equal %w[--foo -vds], @argv.options_only
end
def test_empty_argv