aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_ARGV.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-28 22:11:08 -0500
committerJack Nagel2014-08-28 22:11:08 -0500
commite18da89f3c4331d65ef32f75c3271242b41246dc (patch)
treec66dc707ee5fb941d817cb20ae29640f93a325fa /Library/Homebrew/test/test_ARGV.rb
parent7a5e4f5ccab58bd6f7b8ff86fdf53e572d7d1723 (diff)
downloadbrew-e18da89f3c4331d65ef32f75c3271242b41246dc.tar.bz2
Implement ARGV.named in terms of ARGV.options_only
Diffstat (limited to 'Library/Homebrew/test/test_ARGV.rb')
-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