aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/locale_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/test/locale_spec.rb b/Library/Homebrew/test/locale_spec.rb
index 9e4d09e83..9c684f0e7 100644
--- a/Library/Homebrew/test/locale_spec.rb
+++ b/Library/Homebrew/test/locale_spec.rb
@@ -9,6 +9,10 @@ describe Locale do
expect(described_class.parse("zh-CN-Hans")).to eql(described_class.new("zh", "CN", "Hans"))
end
+ it "correctly parses a string with a UN M.49 region code" do
+ expect(described_class.parse("es-419")).to eql(described_class.new("es", "419", nil))
+ end
+
context "raises a ParserError when given" do
it "an empty string" do
expect { described_class.parse("") }.to raise_error(Locale::ParserError)