summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/links_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/links_test.rb b/test/links_test.rb
index a78664a9..0c122f2b 100644
--- a/test/links_test.rb
+++ b/test/links_test.rb
@@ -26,6 +26,15 @@ context 'Links' do
assert_xpath "//a[@href='file:///etc/app.conf'][text() = '/etc/app.conf']", convert_string('Edit the configuration file link:file:///etc/app.conf[]', :attributes => {'hide-uri-scheme' => ''})
end
+ test 'should not hide bare URI scheme in implicit text of link macro when hide-uri-scheme is set' do
+ {
+ 'link:https://[]' => 'https://',
+ 'link:ssh://[]' => 'ssh://'
+ }.each do |input, expected|
+ assert_xpath %(/a[text() = "#{expected}"]), (convert_inline_string input, :attributes => { 'hide-uri-scheme' => '' })
+ end
+ end
+
test 'qualified url with label' do
assert_xpath "//a[@href='http://asciidoc.org'][text() = 'AsciiDoc']", convert_string("We're parsing http://asciidoc.org[AsciiDoc] markup")
end