diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2013-05-29 01:31:53 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2013-05-29 01:31:53 -0700 |
| commit | ac16a154e7a61eb14fd68e51da177e6ea792927b (patch) | |
| tree | 66ee0c989f20d4e508be00b32c2de6a78e6d5ec7 /test/reader_test.rb | |
| parent | 732c31d7aa60938a58add238d851fcd8e664d37c (diff) | |
| parent | 7b6d7eb62186c29e20b3547c0231bbdf912dddf9 (diff) | |
Merge pull request #368 from mojavelinux/sub-include-target-attributes
resolves #367 resolve attribute references in target of include macro
Diffstat (limited to 'test/reader_test.rb')
| -rw-r--r-- | test/reader_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb index 2340d435..4982b665 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -275,6 +275,19 @@ last line assert_match(/^:includefile: include-file.asciidoc$/, lines.join) end + test 'attributes are substituted in target of include macro' do + input = <<-EOS +:fixturesdir: fixtures +:ext: asciidoc + +include::{fixturesdir}/include-file.{ext}[] + EOS + + doc = document_from_string input, :safe => Asciidoctor::SafeMode::SAFE, :attributes => {'docdir' => File.dirname(__FILE__)} + output = doc.render + assert_match(/included content/, output) + end + test 'escaped include macro is left unprocessed' do input = <<-EOS \\include::include-file.asciidoc[] |
