summaryrefslogtreecommitdiff
path: root/test/reader_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-04-30 22:30:07 -0600
committerGitHub <noreply@github.com>2023-04-30 22:30:07 -0600
commit5559941eb0bb23e72f2b64226415e071e257c347 (patch)
treebf9ccbf09f7931d142fc207e290306aef88b9e2a /test/reader_test.rb
parent72259cb282fc80b5f9b30f25e9674ff2ef2c3f71 (diff)
resolves #3929 treat uri:classloader: as absolute path prefix when running on JRuby (PR #4444)
Diffstat (limited to 'test/reader_test.rb')
-rw-r--r--test/reader_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb
index 8c0f18a5..f94ac2bd 100644
--- a/test/reader_test.rb
+++ b/test/reader_test.rb
@@ -740,6 +740,15 @@ class ReaderTest < Minitest::Test
assert_match(/<h1>人<\/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'
----