diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2017-11-18 23:52:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-18 23:52:40 -0700 |
| commit | 46700a9c12d1cfe551db2790dd232baa0bec8195 (patch) | |
| tree | 6aac61217a133a9920c215155b24eaf0572a6a1b /test/api_test.rb | |
| parent | 755ec8c381b8cfe113884f7e946495d85aca7684 (diff) | |
resolves #2478 assign Document#source_location when sourcemap option is enabled (PR #2488)
Diffstat (limited to 'test/api_test.rb')
| -rw-r--r-- | test/api_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/api_test.rb b/test/api_test.rb index a6050b58..650d4ebd 100644 --- a/test/api_test.rb +++ b/test/api_test.rb @@ -208,6 +208,10 @@ idseparator=-') test 'should track file and line information with blocks if sourcemap option is set' do doc = Asciidoctor.load_file fixture_path('sample.asciidoc'), :sourcemap => true + refute_nil doc.source_location + assert_equal 'sample.asciidoc', doc.file + assert_equal 1, doc.lineno + section_1 = doc.sections[0] assert_equal 'Section A', section_1.title refute_nil section_1.source_location |
