citeproc-js citation data object in the test suite (the CITATIONS stanza)

Hi,

instead of changing the test-suite input and remove the CITATIONS
stanza, I decided to implement the citeproc-js citation data object,
which was easy.

Still I cannot figure out the way citeproc-js is producing its output.
Each citation is prefixed by an index, '>>[0] ', which sometimes takes
this different form: ‘…[0]’. I’m not able to understand when a '>>'
must be replaced by a ‘…’ and I need Frank’s help.

TIA.

Andrea

Hi,

instead of changing the test-suite input and remove the CITATIONS
stanza, I decided to implement the citeproc-js citation data object,
which was easy.

Still I cannot figure out the way citeproc-js is producing its output.
Each citation is prefixed by an index, '>>[0] ', which sometimes takes
this different form: ‘…[0]’. I’m not able to understand when a ‘>>’
must be replaced by a ‘…’ and I need Frank’s help.

Good morning!

The prefix strings are added by the test framework, in
src/testing_stdrhino.js. The “>>” lines were added by the last
citation in the input, and the “…” lines were left unchanged when the
last citation was processed. The CITATION-ITEMS tests can mimic the
operation of a word-processor plugin, and the flags allow us to test
that the processor is only returning the minimal output needed to
produce the desired result.

For a processor that always runs in batch mode (like citeproc-hs,
running against pandoc, at least), some of the CITATION-ITEMS tests
will not be useful. We might want to divide the suite on that basis?

Hi,

instead of changing the test-suite input and remove the CITATIONS
stanza, I decided to implement the citeproc-js citation data object,
which was easy.

Still I cannot figure out the way citeproc-js is producing its output.
Each citation is prefixed by an index, '>>[0] ', which sometimes takes
this different form: ‘…[0]’. I’m not able to understand when a ‘>>’
must be replaced by a ‘…’ and I need Frank’s help.

Good morning!

Good morning!

The prefix strings are added by the test framework, in
src/testing_stdrhino.js. The “>>” lines were added by the last
citation in the input, and the “…” lines were left unchanged when the
last citation was processed. The CITATION-ITEMS tests can mimic the
operation of a word-processor plugin, and the flags allow us to test
that the processor is only returning the minimal output needed to
produce the desired result.

For a processor that always runs in batch mode (like citeproc-hs,
running against pandoc, at least), some of the CITATION-ITEMS tests
will not be useful. We might want to divide the suite on that basis?

I think you mean CITATIONS… but I’m going to sleep (it is still the
11st here) so I could be wrong.

Yes, I had the feeling that the CITATIONS array represented something
changing over time. A batch processor like citeproc-hs may mimic such
a behavior, but that would be useless. Probably that part of the
test-suite could be indeed moved into some autonomous directory for
testing the citeproc internal (changing) state when needed.

Andrea