diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-10-27 17:34:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-27 17:34:59 -0600 |
| commit | 3d8f4805d9b3f775e867f8e6cda4fd7ae89081d1 (patch) | |
| tree | c426e1f8a86c1a9dff746c54bea7c3d6bcab2b05 /test/parser_test.rb | |
| parent | d5b9fb79b0dd5709abd31d7166dd28e93882ec09 (diff) | |
resolves #2769 report correct line number for inline anchor with id already in use (PR #2938)
Diffstat (limited to 'test/parser_test.rb')
| -rw-r--r-- | test/parser_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/parser_test.rb b/test/parser_test.rb index bef40f4e..68811b27 100644 --- a/test/parser_test.rb +++ b/test/parser_test.rb @@ -704,4 +704,19 @@ devtmpfs 3.9G 0 3.9G 0% /dev assert_equal expected, lines end + test 'should warn if inline anchor is already in use' do + input = <<-EOS +[#in-use] +A paragraph with an id. + +Another paragraph +[[in-use]]that uses an id +which is already in use. + EOS + + using_memory_logger do |logger| + document_from_string input + assert_message logger, :WARN, '<stdin>: line 5: id assigned to anchor already in use: in-use', Hash + end + end end |
