diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-10-28 02:05:51 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-28 02:05:51 -0600 |
| commit | bfa01fa734e8dc4f18bf9841b3799fd6971f3b04 (patch) | |
| tree | de648c247fd6370d3088db03ced25f4848f1908a /test/parser_test.rb | |
| parent | edf971ac9d59559122c228c939ded3f6d1f630b8 (diff) | |
resolves #669 allow authorinitials for single author to be overridden (PR #2943)
Diffstat (limited to 'test/parser_test.rb')
| -rw-r--r-- | test/parser_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/parser_test.rb b/test/parser_test.rb index 68811b27..2e96bef1 100644 --- a/test/parser_test.rb +++ b/test/parser_test.rb @@ -359,6 +359,26 @@ context "Parser" do assert_equal 'Scherer, Jr.', doc.attributes['lastname'] end + test 'use explicit authorinitials if set after implicit author line' do + input = <<-EOS.chomp +Jean-Claude Van Damme +:authorinitials: JCVD + EOS + doc = empty_document + parse_header_metadata input, doc + assert_equal 'JCVD', doc.attributes['authorinitials'] + end + + test 'use explicit authorinitials if set after author attribute' do + input = <<-EOS.chomp +:author: Jean-Claude Van Damme +:authorinitials: JCVD + EOS + doc = empty_document + parse_header_metadata input, doc + assert_equal 'JCVD', doc.attributes['authorinitials'] + end + test 'sets authorcount to 0 if document has no authors' do input = '' doc = empty_document |
