summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-06-08 02:22:19 -0600
committerGitHub <noreply@github.com>2022-06-08 02:22:19 -0600
commit618c5880fa0386e2fdabd3f10ea48ef2db03c311 (patch)
tree2c41a26e8e61950a7a792559cf5b21df7147e7b7 /test
parent8265abc461a8576faad9413cc8395f40c833e34c (diff)
resolves #4297 propagate :to_dir option to document of AsciiDoc table cell (PR #4298)
Diffstat (limited to 'test')
-rw-r--r--test/tables_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tables_test.rb b/test/tables_test.rb
index 0e033607..1132d335 100644
--- a/test/tables_test.rb
+++ b/test/tables_test.rb
@@ -1905,6 +1905,19 @@ context 'Tables' do
assert_css 'table > tbody > tr > td:nth-child(2) table > tbody > tr > td', output, 1
end
+ test 'AsciiDoc table cell should inherit to_dir option from parent document' do
+ doc = document_from_string <<~'EOS', parse: true, to_dir: testdir
+ |===
+ a|
+ AsciiDoc table cell
+ |===
+ EOS
+
+ nested_doc = (doc.blocks[0].find_by context: :document, traverse_documents: true)[0]
+ assert nested_doc.nested?
+ assert_equal doc.options[:to_dir], nested_doc.options[:to_dir]
+ end
+
test 'AsciiDoc table cell should not inherit toc setting from parent document' do
input = <<~'EOS'
= Document Title