From 2ddb9fc0506b6fe7eb07f3c12dd246aaccae4e9f Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sun, 30 Apr 2023 22:30:07 -0600 Subject: backport fix for #3929 treat uri:classloader: as absolute path prefix when running on JRuby --- test/reader_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/reader_test.rb') diff --git a/test/reader_test.rb b/test/reader_test.rb index cf4eaa57..3c78bed5 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -678,6 +678,15 @@ class ReaderTest < Minitest::Test assert_match(/

人<\/h1>/, output) end + test 'should include content from a file on the classloader', if: jruby? do + require fixture_path 'assets.jar' + input = 'include::uri:classloader:/includes-in-jar/include-file.adoc[]' + doc = document_from_string input, safe: :unsafe, standalone: false, base_dir: DIRNAME + output = doc.convert + assert_match(/included from a file/, output) + assert doc.catalog[:includes]['uri:classloader:/includes-in-jar/include-file'] + end + test 'should not track include in catalog for non-AsciiDoc include files' do input = <<~'EOS' ---- -- cgit v1.2.3