I am getting a test failure that I don’t understand. The test is test-suite/processor-tests/humans/name_CiteGroupDelimiterWithYearSuffixCollapse2.txt at master · citation-style-language/test-suite · GitHub.
We have a citation which contains two cites to various works by the prolific Alan Aalto, followed by one to Mr Bartleby’s output, and then a load more to Mr Aalto. The expected result is:
(Aalto 2015a,b; Bartleby 2010; Aalto 2015c–e)
But I get
(Aalto 2015a–e; Bartleby 2010)
However, by my reading of the Spec, my output is correct.
With cite grouping, cites in in-text citations with identical rendered names are grouped together, e.g. the year-sorted “(Doe 1999; Smith 2002; Doe 2006; Doe et al. 2007)” becomes “(Doe 1999; Doe 2006; Smith 2002; Doe et al. 2007)”. The comparison is limited to the output of the (first) cs:names element, but includes output rendered through cs:substitute. Cite grouping takes places after cite sorting and disambiguation. Grouped cites maintain their relative order, and are moved to the original location of the first cite of the group.
So in this case, the first thing that should happen (before collapsing) is that all the Aalto works get moved to the position of the first of them, at the head of the list. Then they collapse. That produces the result I am getting, not the one in the test suite.
Am I wrong? It’s such a rare case that I am not sure I’d bother much with it anyway, since cite-collapsing is such a nightmare anyway that I’m inclined to accept any reasonable result!