summaryrefslogtreecommitdiff
path: root/test/parser_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-03-18 16:32:49 -0600
committerGitHub <noreply@github.com>2017-03-18 16:32:49 -0600
commitf583a310baf9bab618678f23c61bf11717ff194a (patch)
treeac508f94f1143e9a22c4d805c43ea7aab4973b18 /test/parser_test.rb
parenta4ff466ede1f0c4d0ef955b9ecd2c06ec5e52b28 (diff)
use delete instead of tr to remove spaces; optimize options parsing (PR #2088)
Diffstat (limited to 'test/parser_test.rb')
-rw-r--r--test/parser_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parser_test.rb b/test/parser_test.rb
index b277aa5c..6caab147 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -172,7 +172,7 @@ context "Parser" do
test "collect options attribute" do
attributes = {}
line = "quote, options='opt1,opt2 , opt3'"
- expected = {1 => 'quote', 'options' => 'opt1,opt2 , opt3', 'opt1-option' => '', 'opt2-option' => '', 'opt3-option' => ''}
+ expected = {1 => 'quote', 'options' => 'opt1,opt2,opt3', 'opt1-option' => '', 'opt2-option' => '', 'opt3-option' => ''}
Asciidoctor::AttributeList.new(line).parse_into(attributes)
assert_equal expected, attributes
end
@@ -180,7 +180,7 @@ context "Parser" do
test "collect opts attribute as options" do
attributes = {}
line = "quote, opts='opt1,opt2 , opt3'"
- expected = {1 => 'quote', 'options' => 'opt1,opt2 , opt3', 'opt1-option' => '', 'opt2-option' => '', 'opt3-option' => ''}
+ expected = {1 => 'quote', 'options' => 'opt1,opt2,opt3', 'opt1-option' => '', 'opt2-option' => '', 'opt3-option' => ''}
Asciidoctor::AttributeList.new(line).parse_into(attributes)
assert_equal expected, attributes
end