summaryrefslogtreecommitdiff
path: root/test/paragraphs_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/paragraphs_test.rb')
-rw-r--r--test/paragraphs_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/paragraphs_test.rb b/test/paragraphs_test.rb
index ebb5fb94..be422234 100644
--- a/test/paragraphs_test.rb
+++ b/test/paragraphs_test.rb
@@ -328,6 +328,11 @@ context 'Paragraphs' do
[source]
use the source, luke!
EOS
+ block = block_from_string input
+ assert_equal :listing, block.context
+ assert_equal 'source', (block.attr 'style')
+ assert_equal :paragraph, (block.attr 'cloaked-context')
+ assert_nil (block.attr 'language')
output = convert_string_to_embedded input
assert_xpath %(/*[@class="listingblock"]//pre[@class="highlight"]/code[text()="use the source, luke!"]), output, 1
end
@@ -337,6 +342,11 @@ context 'Paragraphs' do
[source, perl]
die 'zomg perl is tough';
EOS
+ block = block_from_string input
+ assert_equal :listing, block.context
+ assert_equal 'source', (block.attr 'style')
+ assert_equal :paragraph, (block.attr 'cloaked-context')
+ assert_equal 'perl', (block.attr 'language')
output = convert_string_to_embedded input
assert_xpath %(/*[@class="listingblock"]//pre[@class="highlight"]/code[@class="language-perl"][@data-lang="perl"][text()="die 'zomg perl is tough';"]), output, 1
end