diff options
| author | Jack Nagel | 2014-08-29 19:38:32 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-29 19:38:32 -0500 |
| commit | b14851903c258b62968581f26ab9537f89b37456 (patch) | |
| tree | 3db7ca9bbe62f287c6860d2cb38bbc73109702e9 /Library/Homebrew/test | |
| parent | 6885f588d024839f1f49df0859a682e0e9963e04 (diff) | |
| download | brew-b14851903c258b62968581f26ab9537f89b37456.tar.bz2 | |
Add a method for retrieving only flags from ARGV
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_ARGV.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_ARGV.rb b/Library/Homebrew/test/test_ARGV.rb index 7403acf7c..fe50621cd 100644 --- a/Library/Homebrew/test/test_ARGV.rb +++ b/Library/Homebrew/test/test_ARGV.rb @@ -30,6 +30,11 @@ class ArgvExtensionTests < Homebrew::TestCase assert_equal %w[--foo -vds], @argv.options_only end + def test_flags_only + @argv << "--foo" << "-vds" << "a" << "b" << "cdefg" + assert_equal %w[--foo], @argv.flags_only + end + def test_empty_argv assert_empty @argv.named assert_empty @argv.kegs |
