summaryrefslogtreecommitdiff
path: root/test/api_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2018-01-14 23:40:10 -0700
committerGitHub <noreply@github.com>2018-01-14 23:40:10 -0700
commit6eff25d85e4b3da76a532cda6c42ee985ea6cc68 (patch)
tree85de60a28156de39ffa1f1a93a13b0d59f1558ad /test/api_test.rb
parent17cb555cf1c59bc9753019fe839306fa72d73349 (diff)
resolves #2518 don't expand docdir value passed to API (PR #2522)
Diffstat (limited to 'test/api_test.rb')
-rw-r--r--test/api_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/api_test.rb b/test/api_test.rb
index 650d4ebd..fec7c48f 100644
--- a/test/api_test.rb
+++ b/test/api_test.rb
@@ -153,6 +153,13 @@ idseparator=-')
assert doc.attributes.has_key?('toc')
end
+ test 'should not expand value of docdir attribute if specified via API' do
+ docdir = 'virtual/directory'
+ doc = document_from_string '', :safe => :safe, :attributes => { 'docdir' => docdir }
+ assert_equal docdir, (doc.attr 'docdir')
+ assert_equal docdir, doc.base_dir
+ end
+
test 'should output timestamps by default' do
doc = document_from_string 'text', :backend => :html5, :attributes => nil
result = doc.convert