diff options
Diffstat (limited to 'test/helpers_test.rb')
| -rw-r--r-- | test/helpers_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/helpers_test.rb b/test/helpers_test.rb index 17080056..6f733b55 100644 --- a/test/helpers_test.rb +++ b/test/helpers_test.rb @@ -51,6 +51,16 @@ context 'Helpers' do assert Asciidoctor::UriSniffRx !~ 'c:\\sample.adoc' end + test 'uriish? should not detect a classloader path as a URI on JRuby' do + input = 'uri:classloader:/sample.png' + assert Asciidoctor::UriSniffRx =~ input + if jruby? + refute Asciidoctor::Helpers.uriish? input + else + assert Asciidoctor::Helpers.uriish? input + end + end + test 'UriSniffRx should not detect URI that does not start on first line' do assert Asciidoctor::UriSniffRx !~ %(text\nhttps://example.org) end |
