diff options
| author | Jack Nagel | 2013-01-30 11:04:54 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-30 11:09:33 -0600 |
| commit | 7bec7abecd79ea515fe9a8995cc07d41a5050958 (patch) | |
| tree | 966e9b903043ccf58fb602242a0807f00013759a /Library/Homebrew/test | |
| parent | bfc722e552e0f62dff7d9e00c3b7962a5c6497ab (diff) | |
| download | homebrew-7bec7abecd79ea515fe9a8995cc07d41a5050958.tar.bz2 | |
Fix passing multiple switches as a single word to the build
Fixes #17434.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_options.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb index 78edb408c..405ead73b 100644 --- a/Library/Homebrew/test/test_options.rb +++ b/Library/Homebrew/test/test_options.rb @@ -140,4 +140,11 @@ class OptionsTests < Test::Unit::TestCase def test_coerce_raises_for_inappropriate_types assert_raises(TypeError) { Options.coerce(1) } end + + def test_coerce_splits_multiple_switches_with_single_dash + array = %w{-vd} + verbose = Option.new("-v") + debug = Option.new("-d") + assert_equal [verbose, debug].sort, Options.coerce(array).to_a.sort + end end |
