Sha256: e960b3a12c95a5346915eb808efaa78058a697982d5de657cb96af4a43fc6e92

Contents?: true

Size: 1.89 KB

Versions: 4

Compression:

Stored size: 1.89 KB

Contents

Feature: sort
  As a CSL cite processor hacker
  I want the test sort_BibliographyCitationNumberDescendingViaMacro to pass

  @bibliography @sort
  Scenario: Bibliography Citation Number Descending Via Macro
    Given the following style:
    """
    <style 
          xmlns="http://purl.org/net/xbiblio/csl"
          class="note"
          version="1.0">
      <info>
        <id />
        <title />
        <updated>2009-08-10T04:49:00+09:00</updated>
      </info>
      <macro name="citation-number">
        <text variable="citation-number"/>
      </macro>
      <citation>
        <layout>
          <text value="bogus"/>
        </layout>
      </citation>
      <bibliography>
        <sort>
          <key macro="citation-number" sort="descending"/>
        </sort>
        <layout>
          <text variable="citation-number" prefix="[" suffix="] "/>
          <text variable="title" />
        </layout>
      </bibliography>
    </style>
    """
    And the following input:
    """
    [{"id":"item-1","title":"Book One","type":"book"},{"id":"item-3","title":"Book Three","type":"book"},{"id":"item-4","title":"Book Four","type":"book"},{"id":"item-6","title":"Book Six","type":"book"},{"id":"item-2","title":"Book Two","type":"book"},{"id":"item-5","title":"Book Five","type":"book"},{"id":"item-7","title":"Book Seven","type":"book"},{"id":"item-8","title":"Book Eight","type":"book"}]
    """
    When I render the entire bibliography
    Then the bibliography should be:
    """
    <div class="csl-bib-body">
      <div class="csl-entry">[8] Book One</div>
      <div class="csl-entry">[7] Book Three</div>
      <div class="csl-entry">[6] Book Four</div>
      <div class="csl-entry">[5] Book Six</div>
      <div class="csl-entry">[4] Book Two</div>
      <div class="csl-entry">[3] Book Five</div>
      <div class="csl-entry">[2] Book Seven</div>
      <div class="csl-entry">[1] Book Eight</div>
    </div>
    """

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
citeproc-1.0.7 features/sort/BibliographyCitationNumberDescendingViaMacro.feature
citeproc-1.0.6 features/sort/BibliographyCitationNumberDescendingViaMacro.feature
citeproc-1.0.5 features/sort/BibliographyCitationNumberDescendingViaMacro.feature
citeproc-1.0.4 features/sort/BibliographyCitationNumberDescendingViaMacro.feature