citeproc 0.14 → 0.14.1
raw patch · 85 files changed
+534/−138 lines, 85 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +30/−0
- citeproc.cabal +3/−1
- src/Citeproc/CslJson.hs +1/−1
- src/Citeproc/Types.hs +10/−4
- test/NOTES.md +17/−0
- test/Spec.hs +82/−99
- test/csl/affix_CommaAfterQuote.expected +1/−0
- test/csl/affix_WithCommas.expected +3/−0
- test/csl/bugreports_AutomaticallyDeleteItemsFails.expected +11/−0
- test/csl/bugreports_ChicagoAuthorDateLooping.expected +1/−0
- test/csl/bugreports_DemoPageFullCiteCruftOnSubsequent.expected +1/−0
- test/csl/bugreports_EnvAndUrb.expected +3/−0
- test/csl/bugreports_LegislationCrash.expected +3/−0
- test/csl/bugreports_NoCaseEscape.expected +8/−0
- test/csl/bugreports_OverwriteCitationItems.expected +2/−0
- test/csl/bugreports_SingleQuoteXml.expected +1/−0
- test/csl/bugreports_SmallCapsEscape.expected +5/−0
- test/csl/bugreports_SortedIeeeItalicsFail.txt +3/−4
- test/csl/bugreports_ikeyOne.expected +2/−0
- test/csl/bugreports_parseName.expected +4/−0
- test/csl/date_NegativeDateSort.txt +2/−3
- test/csl/date_NegativeDateSortViaMacro.txt +2/−3
- test/csl/date_NegativeDateSortViaMacroOnYearMonthOnly.txt +2/−3
- test/csl/date_VariousInvalidDates.txt +20/−2
- test/csl/date_YearSuffixImplicitWithNoDate.expected +1/−0
- test/csl/date_YearSuffixWithNoDate.expected +1/−0
- test/csl/decorations_Baseline.txt +2/−3
- test/csl/disambiguate_CitationLabelInData.expected +1/−0
- test/csl/disambiguate_DifferentSpacingInInitials.expected +1/−0
- test/csl/disambiguate_DisambiguationHang.expected +3/−0
- test/csl/disambiguate_IncrementalExtraText.expected +5/−0
- test/csl/disambiguate_InitializeWithButNoDisambiguation.expected +1/−0
- test/csl/disambiguate_SkipAccessedYearSuffix.txt +5/−5
- test/csl/disambiguate_YearCollapseWithInstitution.expected +3/−0
- test/csl/disambiguate_YearSuffixAtTwoLevels.expected +1/−0
- test/csl/disambiguate_YearSuffixWithEtAlSubequent.expected +3/−0
- test/csl/disambiguate_YearSuffixWithEtAlSubsequent.expected +3/−0
- test/csl/flipflop_LeadingMarkupWithApostrophe.expected +1/−0
- test/csl/flipflop_OrphanQuote.expected +1/−0
- test/csl/integration_FirstReferenceNoteNumberPositionChange.expected +5/−0
- test/csl/integration_IbidOnInsert.expected +4/−0
- test/csl/magic_CapitalizeFirstOccurringTerm.expected +1/−0
- test/csl/magic_NameSuffixNoComma.expected +1/−0
- test/csl/magic_NameSuffixWithComma.expected +1/−0
- test/csl/magic_PunctuationInQuoteNested.expected +1/−0
- test/csl/magic_SubsequentAuthorSubstituteNotFooled.txt +3/−4
- test/csl/magic_TermCapitalizationWithPrefix.expected +4/−0
- test/csl/name_CiteGroupDelimiterWithYearSuffixCollapse2.expected +1/−0
- test/csl/name_EtAlWithCombined.expected +5/−0
- test/csl/name_HebrewAnd.expected +1/−0
- test/csl/name_HyphenatedNonDroppingParticle1.expected +5/−0
- test/csl/name_HyphenatedNonDroppingParticle2.expected +5/−0
- test/csl/name_InTextMarkupInitialize.expected +4/−0
- test/csl/name_InTextMarkupNormalizeInitials.expected +4/−0
- test/csl/name_ParseNames.expected +1/−0
- test/csl/name_ParsedDroppingParticleWithApostrophe.expected +1/−0
- test/csl/name_ParsedNonDroppingParticleWithApostrophe.expected +1/−0
- test/csl/name_ParticleCaps3.expected +5/−0
- test/csl/name_ParticleCaps3.txt +1/−1
- test/csl/name_ParticlesDemoteNonDroppingNever.expected +61/−0
- test/csl/number_OrdinalSpacing.expected +1/−0
- test/csl/number_PlainHyphenOrEnDashAlwaysPlural.expected +1/−0
- test/csl/page_Chicago.txt +15/−3
- test/csl/position_FirstTrueOnlyOnce.expected +2/−0
- test/csl/position_IbidInText.expected +3/−0
- test/csl/position_IbidSeparateCiteSameNote.expected +7/−0
- test/csl/position_IbidWithLocator.expected +2/−0
- test/csl/position_IbidWithMultipleSoloCitesInBackref.expected +4/−0
- test/csl/position_IfIbidWithLocatorIsTrueThenIbidIsTrue.expected +2/−0
- test/csl/position_NearNoteSameNote.expected +3/−0
- test/csl/position_ResetNoteNumbers.expected +8/−0
- test/csl/punctuation_FullMontyQuotesIn.expected +47/−0
- test/csl/quotes_QuotesUnderQuotesFalse.expected +3/−0
- test/csl/sort_BibliographyCitationNumberDescending.expected +10/−0
- test/csl/sort_BibliographyCitationNumberDescendingViaCompositeMacro.expected +6/−0
- test/csl/sort_BibliographyCitationNumberDescendingViaMacro.expected +10/−0
- test/csl/sort_OmittedBibRefMixedNumericStyle.expected +5/−0
- test/csl/sort_OmittedBibRefMixedNumericStyle.txt +22/−2
- test/csl/sort_OmittedBibRefNonNumericStyle.expected +5/−0
- test/csl/sort_RangeUnaffected.expected +2/−0
- test/csl/substitute_SubstituteOnlyOnceTermEmpty.expected +1/−0
- test/csl/testers_FirstAutoGeneratedZoteroPluginTest.expected +2/−0
- test/csl/testers_SecondAutoGeneratedZoteroPluginTest.expected +5/−0
- test/overrides/flipflop_NumericField.expected +1/−0
- test/overrides/fullstyles_ABdNT.expected +3/−0
CHANGELOG.md view
@@ -1,5 +1,35 @@ # citeproc changelog +## 0.14.1++ * Stop extracting particles from given and family names.+ citeproc.js implemented a system by which particles would+ be extracted automatically from given and family names (so+ that users of Zotero wouldn't have to know about the various+ types of particles). The test suite does this unless the+ name is enclosed in straight quotes, in which case it is+ considered literally. We don't want this feature, because it is+ not part of the CSL spec, and the CSL JSON files exported from+ Zotero don't put the quotes where they would be needed for this to+ work. However, we still remove an outer pair of quotes, in case+ there is legacy use of this feature.+ See discussion at jgm/pandoc#11911 .++ * Record how known failures fail, instead of just that they fail. A+ test we don't yet pass now has an `.expected` file alongside its+ `.txt` file, containing the output we currently produce. It counts+ as an expected failure only if its output still matches that file+ exactly, so a change in a known-bad result is no longer silently+ tolerated. This replaces the flat list of expected failures in+ test/Spec.hs, five entries of which had gone stale.++ * Two new test-suite options: `--accept` (re)writes the `.expected` file of+ every failing test and removes that of every test that now passes, and+ `--verbose` reports warnings, passes, and expected failures with diffs,+ which are otherwise suppressed.++ * Add five new tests from upstream (all passing).+ ## 0.14 * [API change] Replace unlawful Ord Term instance with `termMatches`.
citeproc.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: citeproc-version: 0.14+version: 0.14.1 synopsis: Generates citations and bibliography from CSL styles. description: citeproc parses CSL style files and uses them to generate a list of formatted citations and bibliography@@ -21,8 +21,10 @@ locales/locales.json test/NOTES.md test/csl/*.txt+ test/csl/*.expected test/extra/*.txt test/overrides/*.txt+ test/overrides/*.expected source-repository head type: git
src/Citeproc/CslJson.hs view
@@ -259,7 +259,7 @@ go ctx{ useSmallCaps = True } x <> "</span>" CslSup x -> "<sup>" <> go ctx x <> "</sup>" CslSub x -> "<sub>" <> go ctx x <> "</sub>"- CslBaseline x -> "<span style=\"baseline\">" <> go ctx x <> "</span>"+ CslBaseline x -> "<span class=\"baseline\">" <> go ctx x <> "</span>" CslDiv t x -> "<div class=\"csl-" <> t <> "\">" <> go ctx x <> "</div>" CslLink t x -> "<a href=\"" <> t <> "\">" <> go ctx x <> "</a>" CslNoCase x -> go ctx x -- nocase is just for internal purposes
src/Citeproc/Types.hs view
@@ -1212,10 +1212,9 @@ instance FromJSON Name where parseJSON (String t) = parseCheaterName t parseJSON x =- extractParticles <$> (withObject "Name" $ \v -> Name- <$> (fmap fixApos <$> v .:? "family")- <*> (fmap fixApos <$> v .:? "given")+ <$> (fmap (removeOuterQuotes . fixApos) <$> v .:? "family")+ <*> (fmap (removeOuterQuotes . fixApos) <$> v .:? "given") <*> (fmap fixApos <$> v .:? "dropping-particle") <*> (fmap fixApos <$> v .:? "non-dropping-particle") <*> (fmap fixApos <$> v .:? "suffix")@@ -1296,6 +1295,13 @@ c == '.' isParticleChar c = isLower c || isParticlePunct c +removeOuterQuotes :: Text -> Text+removeOuterQuotes t+ | "\"" `T.isPrefixOf` t+ , "\"" `T.isSuffixOf` t+ = T.drop 1 $ T.dropEnd 1 t+ | otherwise = t+ -- cheater syntax for name: used in parsing note: -- editor: Thompson || Hunter S. parseCheaterName :: Text -> Parser Name@@ -1929,7 +1935,7 @@ pCslSub = addVerticalAlign SubAlign . mconcat <$> (P.string "<sub>" *> P.manyTill' pCsl (P.string "</sub>")) pCslBaseline = addVerticalAlign BaselineAlign . mconcat <$>- (P.string "<span" *> pSpace *> P.string "style=\"baseline\">" *>+ (P.string "<span" *> pSpace *> P.string "class=\"baseline\">" *> P.manyTill' pCsl (P.string "</span>")) pCslSmallCaps = addFontVariant SmallCapsVariant . mconcat <$> ((P.string "<span" *> pSpace *>
test/NOTES.md view
@@ -1,3 +1,20 @@+## Known failures++A test that we know we do not yet pass has, alongside its `.txt` file, an+`.expected` file containing the output we currently produce (which differs+from the test's own `RESULT` section). Such a test counts as an expected+failure only if its output still matches that file exactly; any other+output is an unexpected failure and fails the suite. A test that passes+but still has an `.expected` file is reported as an unexpected pass, and+the file should be deleted.++By default only unexpected results are reported. Pass `--verbose` to also+report warnings, passes, and expected failures with their diffs.++`cabal test --test-options=--accept` rewrites the `.expected` file of every+failing test with its current output and removes the file of every test+that now passes. Review the resulting diff before committing it.+ ## Notes on failures ### test/csl/bugreports_UnisaHarvardInitialization.txt
test/Spec.hs view
@@ -7,12 +7,12 @@ import Citeproc.CslJson import Data.Algorithm.DiffContext import System.TimeIt (timeIt)-import Control.Monad (unless)+import Control.Monad (unless, when) import Control.Monad.Trans.State import Control.Monad.IO.Class (liftIO) import System.Environment (getArgs) import System.Exit-import System.Directory (getDirectoryContents, doesFileExist)+import System.Directory (getDirectoryContents, doesFileExist, removeFile) import Data.Text (Text) import qualified Data.Set as Set import qualified Text.PrettyPrint as Pretty@@ -49,6 +49,7 @@ , citations :: Maybe [Citation a] , abbreviations :: Maybe Abbreviations , skipReason :: Maybe Text+ , expectedFailure :: Maybe Text , options :: Maybe TestOptions } deriving (Show) @@ -73,9 +74,17 @@ | Errored CiteprocError deriving (Show, Eq) -runTest :: CiteprocTest (CslJson Text)+-- | Command line options of the test suite itself.+data SpecOptions =+ SpecOptions+ { accept :: Bool -- ^ record failures in .expected files+ , verbose :: Bool -- ^ report warnings, passes and expected failures+ } deriving (Show)++runTest :: SpecOptions+ -> CiteprocTest (CslJson Text) -> StateT Counts IO TestResult-runTest test = do+runTest specOpts test = do let opts = fromMaybe defaultTestOptions . options $ test let cites = case citations test of@@ -116,16 +125,16 @@ let loc = mergeLocales Nothing style let actual = citeproc (testCiteprocOpts opts) style Nothing (input test) cites- unless (null (resultWarnings actual)) $ do+ when (verbose specOpts && not (null (resultWarnings actual))) $ liftIO $ do TIO.putStrLn $ "[WARNING] " <> T.pack (path test) mapM_ (TIO.putStrLn . ("==> " <>)) $ resultWarnings actual case mode test of- "citation" -> compareTest test+ "citation" -> compareTest specOpts test (T.intercalate "\n" $ map (renderCslJson' loc) (resultCitations actual))- "bibliography" -> compareTest test+ "bibliography" -> compareTest specOpts test (T.intercalate "\n" (addDivs $ map (renderCslJson' loc . snd) (resultBibliography actual)))@@ -176,28 +185,55 @@ c == '[' || c == ']' || isDigit c) -compareTest :: CiteprocTest (CslJson Text)+compareTest :: SpecOptions+ -> CiteprocTest (CslJson Text) -> Text -> StateT Counts IO TestResult-compareTest test actual = do+compareTest specOpts test actual = do let expected = if mode test == "citation" && isJust (citations test) then removeCitationNums $ result test else result test+ let expectedFailureFile = expectedFailurePath (path test) if actual == expected then do modify $ \st -> st{ passed = (category test, path test) : passed st }- -- suppress PASSED messages- -- liftIO $ TIO.putStrLn $ "[PASSED] " <> path test+ when (verbose specOpts) $+ liftIO $ TIO.putStrLn $ "[PASSED] " <> T.pack (path test)+ case expectedFailure test of+ Nothing -> return ()+ Just _+ | accept specOpts -> liftIO $ do+ removeFile expectedFailureFile+ putStrLn $ "[REMOVED] " <> expectedFailureFile+ | otherwise -> modify $ \st ->+ st{ unexpectedPasses = path test : unexpectedPasses st } return Passed else do modify $ \st -> st{ failed = (category test, path test) : failed st }- liftIO $ do- TIO.putStrLn $ (if path test `elem` expectedFailures- then "[FAILED:EXPECTED] "- else "[FAILED:UNEXPECTED] ") <> T.pack (path test)- showDiff expected actual+ if expectedFailure test == Just actual+ then when (verbose specOpts) $ liftIO $ do+ TIO.putStrLn $ "[FAILED:EXPECTED] " <> T.pack (path test)+ showDiff expected actual+ else if accept specOpts+ then liftIO $ do+ TIO.writeFile expectedFailureFile (actual <> "\n")+ putStrLn $ "[ACCEPTED] " <> expectedFailureFile+ else do+ modify $ \st ->+ st{ unexpectedFailures =+ path test : unexpectedFailures st }+ liftIO $ do+ TIO.putStrLn $+ "[FAILED:UNEXPECTED] " <> T.pack (path test)+ showDiff expected actual return $ Failed actual expected +-- A test that is known to fail has, alongside its .txt file, an .expected+-- file containing the output we currently produce. The failure counts as+-- an expected failure only if the output still matches this file exactly.+expectedFailurePath :: FilePath -> FilePath+expectedFailurePath fp = fp -<.> ".expected"+ splitSections :: ByteString -> [(Text, ByteString)] splitSections = snd . foldl' go startingState . B.lines . removeBOM where@@ -234,6 +270,13 @@ if exists then Just <$> TIO.readFile (fp <> ".skip") else return Nothing+ expectedFail <- do+ let expectedFp = expectedFailurePath fp+ exists <- doesFileExist expectedFp+ if exists+ -- the file has a final newline, the test output does not+ then Just . T.dropWhileEnd (== '\n') <$> TIO.readFile expectedFp+ else return Nothing return CiteprocTest { name = T.pack $ dropExtension $ takeBaseName fp , path = fp@@ -254,6 +297,7 @@ , abbreviations = fromJSON "ABBREVIATIONS" <$> lookup "abbreviations" sections , skipReason = reason+ , expectedFailure = expectedFail , options = fromJSON "TESTOPTIONS" <$> lookup "options" sections } @@ -281,12 +325,18 @@ main :: IO () main = do args <- getArgs+ -- with --accept, the .expected file of every failing test is (re)written+ -- with its current output, and that of every passing test is removed;+ -- with --verbose, passes and expected failures are reported too+ let specOpts = SpecOptions{ accept = "--accept" `elem` args+ , verbose = "--verbose" `elem` args }+ let patterns = filter (`notElem` ["--accept", "--verbose"]) args let matchesPattern x = takeExtension x == ".txt" &&- case args of+ case patterns of [] -> True- _ -> any (\arg -> map toLower arg `isInfixOf` map toLower x) args- overrides <- if any ('/' `elem`) args+ _ -> any (\arg -> map toLower arg `isInfixOf` map toLower x) patterns+ overrides <- if any ('/' `elem`) patterns then return [] else filter matchesPattern <$> getDirectoryContents overrideDir@@ -295,8 +345,8 @@ then overrideDir </> fp else testDir </> fp - testFiles <- if any ('/' `elem`) args- then return args+ testFiles <- if any ('/' `elem`) patterns+ then return patterns else do cslTests <- map addDir . filter matchesPattern <$> getDirectoryContents testDir@@ -307,11 +357,13 @@ testCases <- sortOn name <$> mapM loadTestCase testFiles (_,counts) <- timeIt $- runStateT (mapM_ runTest testCases)+ runStateT (mapM_ (runTest specOpts) testCases) Counts{ failed = [] , errored = [] , passed = []- , skipped = [] }+ , skipped = []+ , unexpectedFailures = []+ , unexpectedPasses = [] } putStrLn "" let categories = sort $ Set.toList $ foldr (Set.insert . category) mempty testCases@@ -343,23 +395,19 @@ (length (failed counts)) (length (errored counts)) (length (skipped counts))- let unexpectedFailures =- filter ((`notElem` expectedFailures) . snd) (failed counts)- let unexpectedPasses =- filter ((`elem` expectedFailures) . snd) (passed counts)- unless (null unexpectedFailures) $ do+ unless (null (unexpectedFailures counts)) $ do putStrLn "" putStrLn "Unexpected failures" putStrLn "-------------------"- mapM_ (putStrLn . snd) unexpectedFailures+ mapM_ putStrLn (unexpectedFailures counts) putStrLn ""- unless (null unexpectedPasses) $ do+ unless (null (unexpectedPasses counts)) $ do putStrLn "" putStrLn "Unexpected passes" putStrLn "-----------------"- mapM_ (putStrLn . snd) unexpectedPasses+ mapM_ putStrLn (unexpectedPasses counts) putStrLn ""- case length unexpectedFailures + length (errored counts) of+ case length (unexpectedFailures counts) + length (errored counts) of 0 -> do putStrLn "(All failures were expected failures.)" exitSuccess@@ -371,6 +419,8 @@ , errored :: [(Text,FilePath)] , passed :: [(Text,FilePath)] , skipped :: [(Text,FilePath)]+ , unexpectedFailures :: [FilePath] -- failed, but not as recorded+ , unexpectedPasses :: [FilePath] -- passed, though a failure was recorded } deriving (Show) showDiff :: Text -> Text -> IO ()@@ -385,70 +435,3 @@ (Pretty.text "actual") (Pretty.text . T.unpack . unnumber) $ getContextDiff Nothing (T.lines expected) (T.lines actual)--expectedFailures :: [FilePath]-expectedFailures = [- "test/csl/bugreports_OverwriteCitationItems.txt",- "test/csl/bugreports_SingleQuoteXml.txt",- "test/csl/bugreports_SmallCapsEscape.txt",- "test/csl/bugreports_SortedIeeeItalicsFail.txt",- "test/csl/bugreports_ikeyOne.txt",- "test/csl/date_NegativeDateSort.txt",- "test/csl/date_NegativeDateSortViaMacro.txt",- "test/csl/date_NegativeDateSortViaMacroOnYearMonthOnly.txt",- "test/csl/date_YearSuffixImplicitWithNoDate.txt",- "test/csl/date_YearSuffixWithNoDate.txt",- "test/csl/disambiguate_DifferentSpacingInInitials.txt",- "test/csl/disambiguate_DisambiguationHang.txt",- "test/csl/disambiguate_IncrementalExtraText.txt",- "test/csl/disambiguate_InitializeWithButNoDisambiguation.txt",- "test/csl/disambiguate_YearCollapseWithInstitution.txt",- "test/csl/disambiguate_YearSuffixAtTwoLevels.txt",- "test/csl/disambiguate_YearSuffixWithEtAlSubequent.txt",- "test/csl/disambiguate_YearSuffixWithEtAlSubsequent.txt",- "test/csl/flipflop_LeadingMarkupWithApostrophe.txt",- "test/csl/flipflop_OrphanQuote.txt",- "test/overrides/fullstyles_ABdNT.txt",- "test/csl/integration_FirstReferenceNoteNumberPositionChange.txt",- "test/csl/integration_IbidOnInsert.txt",- "test/csl/magic_CapitalizeFirstOccurringTerm.txt",- "test/csl/magic_PunctuationInQuoteNested.txt",- "test/csl/magic_SubsequentAuthorSubstituteNotFooled.txt",- "test/csl/magic_TermCapitalizationWithPrefix.txt",- "test/csl/name_CiteGroupDelimiterWithYearSuffixCollapse2.txt",- "test/csl/name_EtAlWithCombined.txt",- "test/csl/name_HebrewAnd.txt",- "test/csl/name_InTextMarkupInitialize.txt",- "test/csl/name_InTextMarkupNormalizeInitials.txt",- "test/csl/number_OrdinalSpacing.txt",- "test/csl/number_PlainHyphenOrEnDashAlwaysPlural.txt",- "test/csl/position_FirstTrueOnlyOnce.txt",- "test/csl/position_IbidInText.txt",- "test/csl/position_IbidSeparateCiteSameNote.txt",- "test/csl/position_IbidWithLocator.txt",- "test/csl/position_IbidWithMultipleSoloCitesInBackref.txt",- "test/csl/position_IfIbidWithLocatorIsTrueThenIbidIsTrue.txt",- "test/csl/position_NearNoteSameNote.txt",- "test/csl/position_ResetNoteNumbers.txt",- "test/csl/punctuation_FullMontyQuotesIn.txt",- "test/csl/quotes_QuotesUnderQuotesFalse.txt",- "test/csl/sort_BibliographyCitationNumberDescending.txt",- "test/csl/sort_BibliographyCitationNumberDescendingViaCompositeMacro.txt",- "test/csl/sort_BibliographyCitationNumberDescendingViaMacro.txt",- "test/csl/sort_LeadingApostropheOnNameParticle.txt",- "test/csl/sort_OmittedBibRefMixedNumericStyle.txt",- "test/csl/sort_OmittedBibRefNonNumericStyle.txt",- "test/csl/sort_RangeUnaffected.txt",- "test/csl/substitute_SubstituteOnlyOnceTermEmpty.txt",- "test/csl/bugreports_NoCaseEscape.txt",- "test/csl/bugreports_LegislationCrash.txt",- "test/csl/bugreports_EnvAndUrb.txt",- "test/csl/bugreports_DemoPageFullCiteCruftOnSubsequent.txt",- "test/csl/bugreports_ChicagoAuthorDateLooping.txt",- "test/csl/bugreports_AutomaticallyDeleteItemsFails.txt",- "test/csl/affix_WithCommas.txt",- "test/csl/affix_CommaAfterQuote.txt",- "test/overrides/flipflop_NumericField.txt",- "test/csl/testers_SecondAutoGeneratedZoteroPluginTest.txt",- "test/csl/testers_FirstAutoGeneratedZoteroPluginTest.txt"- ]
+ test/csl/affix_CommaAfterQuote.expected view
@@ -0,0 +1,1 @@+“quote,” Hello Thing
+ test/csl/affix_WithCommas.expected view
@@ -0,0 +1,3 @@+John Smith, <i>Book C</i>, 2000, and David Jones, <i>Book D</i>, 2000.+Smith, <i>Book C</i> is one source,; Jones, <i>Book D</i> is another.+Smith, <i>Book C</i>, 23 is one source,; Jones, <i>Book D</i> is another.
+ test/csl/bugreports_AutomaticallyDeleteItemsFails.expected view
@@ -0,0 +1,11 @@+<div class="csl-bib-body">+ <div class="csl-entry">+ <div class="csl-left-margin">[1]</div><div class="csl-right-inline"> J. Doe, <i>Book A</i>, 2000.</div>+ </div>+ <div class="csl-entry">+ <div class="csl-left-margin">[2]</div><div class="csl-right-inline"> J. Doe, <i>Book B</i>, 2000.</div>+ </div>+ <div class="csl-entry">+ <div class="csl-left-margin">[3]</div><div class="csl-right-inline"> R. Snoakes, <i>Book C</i>, 2000.</div>+ </div>+</div>
+ test/csl/bugreports_ChicagoAuthorDateLooping.expected view
@@ -0,0 +1,1 @@+(Manstein 1982; Anon.; Anon.)
+ test/csl/bugreports_DemoPageFullCiteCruftOnSubsequent.expected view
@@ -0,0 +1,1 @@+Nolan J. Malone, U.S. Bureau of the Census, <i>Evaluating Components of International Migration: Consistency of 2000 Nativity Data</i> (New York: Routledge, 2001).
+ test/csl/bugreports_EnvAndUrb.expected view
@@ -0,0 +1,3 @@+Baines, T S, O Benedettini and J M Kay, ‘Title One’; Baines, T S, F Gump and J M Kay, ‘Title Two’.+See reference 1, Baines et al., ‘Title One’.+See reference 1, Baines et al., ‘Title Two’.
+ test/csl/bugreports_LegislationCrash.expected view
@@ -0,0 +1,3 @@+<div class="csl-bib-body">+ <div class="csl-entry"><i>Arrêté du 23 mars 1992 relatif au programme des études conduisant au diplôme d’État d’infirmier</i>, 1992.</div>+</div>
+ test/csl/bugreports_NoCaseEscape.expected view
@@ -0,0 +1,8 @@+<div class="csl-bib-body">+ <div class="csl-entry">+ <div class="csl-block">Aalto, Alan</div><div class="csl-left-margin"> N.d.a</div><div class="csl-right-inline">“‘PIAAC-Longitudinal (PIAAC-L) 2015.’”</div>+ </div>+ <div class="csl-entry">+ <div class="csl-left-margin"> N.d.b</div><div class="csl-right-inline">“PIAAC-Longitudinal (PIAAC-Lx) 2015”.</div>+ </div>+</div>
+ test/csl/bugreports_OverwriteCitationItems.expected view
@@ -0,0 +1,2 @@+Title Two; Title Three+Title Four; Title Five
+ test/csl/bugreports_SingleQuoteXml.expected view
@@ -0,0 +1,1 @@+[Cite with a composer ; O A. “hello” <i>Book Title</i>]
+ test/csl/bugreports_SmallCapsEscape.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">+ <div class="csl-block">Aalto, Alan</div><div class="csl-left-margin"> N.d.</div><div class="csl-right-inline"><span style="font-variant:small-caps;">Here</span>.</div>+ </div>+</div>
test/csl/bugreports_SortedIeeeItalicsFail.txt view
@@ -7,13 +7,13 @@ >>===== RESULT =====>> <div class="csl-bib-body"> <div class="csl-entry">- <div class="csl-left-margin">[1]</div><div class="csl-right-inline"> J. Doe, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, Jun. 1965.</div>+ <div class="csl-left-margin">[1]</div><div class="csl-right-inline"> J. Doe, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, June. 1965.</div> </div> <div class="csl-entry">- <div class="csl-left-margin">[2]</div><div class="csl-right-inline"> G. Everhardt, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, Jun. 1965.</div>+ <div class="csl-left-margin">[2]</div><div class="csl-right-inline"> G. Everhardt, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, June. 1965.</div> </div> <div class="csl-entry">- <div class="csl-left-margin">[3]</div><div class="csl-right-inline"> J. Roe, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, Jun. 1965.</div>+ <div class="csl-left-margin">[3]</div><div class="csl-right-inline"> J. Roe, “His Anonymous Article,” <i>Journal of Obscurity</i>, vol. 100, p. 15, June. 1965.</div> </div> </div> <<===== RESULT =====<<@@ -369,4 +369,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/bugreports_ikeyOne.expected view
@@ -0,0 +1,2 @@+(John Smith)+(James Smith)
+ test/csl/bugreports_parseName.expected view
@@ -0,0 +1,4 @@+<div class="csl-bib-body">+ <div class="csl-entry">van Happel, Eduard 2008</div>+ <div class="csl-entry">von Hoppel, Gustav 2008</div>+</div>
test/csl/date_NegativeDateSort.txt view
@@ -9,12 +9,12 @@ (whether ascending or descending). >>===== RESULT =====>>-100BC-7-13, 44BC-3-15, 54AD-10-13, 68AD-6-11+100 BC-7-13, 44 BC-3-15, 54 AD-10-13, 68 AD-6-11 <<===== RESULT =====<< >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -104,4 +104,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
test/csl/date_NegativeDateSortViaMacro.txt view
@@ -9,12 +9,12 @@ (whether ascending or descending). >>===== RESULT =====>>-100BC-7-13, 44BC-3-15, 54AD-10-13, 68AD-6-11+100 BC-7-13, 44 BC-3-15, 54 AD-10-13, 68 AD-6-11 <<===== RESULT =====<< >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -107,4 +107,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
test/csl/date_NegativeDateSortViaMacroOnYearMonthOnly.txt view
@@ -9,12 +9,12 @@ (whether ascending or descending). >>===== RESULT =====>>-BookX (100BC-7-14), BookY (100BC-7-13), BookA (68AD-3-16), BookB (68AD-3-15)+BookX (100 BC-7-14), BookY (100 BC-7-13), BookA (68 AD-3-16), BookB (68 AD-3-15) <<===== RESULT =====<< >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -117,4 +117,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
test/csl/date_VariousInvalidDates.txt view
@@ -3,14 +3,33 @@ <<===== MODE =====<< +>>==== DESCRIPTION ====>> +This depends on correct handling of seasons expressed in month parts per the+discussion at+https://discourse.citationstyles.org/t/edtf-and-date-representation/1663++Additionally, it depends on further, special handling for month values 17 and+18 per the code comment at++https://github.com/Juris-M/citeproc-js/blob/master/src/node_datepart.js#L249++which describes seasons derived from months "with a value of 13, 14, 15, 16,+or (to allow correct ranging with Down Under dates) 17 or 18."++This test is also described in+https://github.com/zotero/citeproc-rs/blob/master/crates/citeproc/tests/data/snapshot.txt#L60++<<==== DESCRIPTION ====<<++ >>===== RESULT =====>> Date: (); Date: (Spring); Date: (Spring); Date: (); Date: (Winter) <<===== RESULT =====<< >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -106,4 +125,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/date_YearSuffixImplicitWithNoDate.expected view
@@ -0,0 +1,1 @@+(John Doe n.d. [Accessed: June 1, 1965]; John Doe n.d. [Accessed: June 1, 2065])
+ test/csl/date_YearSuffixWithNoDate.expected view
@@ -0,0 +1,1 @@+(John Doe n.d. [Accessed: June 1, 1965]; John Doe n.d. [Accessed: June 1, 2065])
test/csl/decorations_Baseline.txt view
@@ -6,13 +6,13 @@ >>== RESULT ==>> <div class="csl-bib-body">- <div class="csl-entry"><sup>Little, Stuart, <span style="baseline">My Short Narrative</span> (1990)</sup></div>+ <div class="csl-entry"><sup>Little, Stuart, <span class="baseline">My Short Narrative</span> (1990)</sup></div> </div> <<== RESULT ==<< >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -70,4 +70,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/disambiguate_CitationLabelInData.expected view
@@ -0,0 +1,1 @@+SpiffLabel1900a; SpiffLabel1900b; Bron00; BrCh98; vEFG26
+ test/csl/disambiguate_DifferentSpacingInInitials.expected view
@@ -0,0 +1,1 @@+Doe, J. J., His Anonymous Life (part 1); Doe, J. J., His Anonymous Life (part 2)
+ test/csl/disambiguate_DisambiguationHang.expected view
@@ -0,0 +1,3 @@+(Caminiti, Johnson, Burnod, Galli, & Ferraina 1990a)+(Caminiti, Johnson, Burnod, Galli, & Ferraina 1990b)+(Caminiti, Johnson, & Urbano 1990a)
+ test/csl/disambiguate_IncrementalExtraText.expected view
@@ -0,0 +1,5 @@+Yost Trisk+John Smith, Book One, ed. 3+John Smith, Book Two, ed. 4+John Smith, Complete Works, ed. 5+John Smith, Complete Works, ed. 6
+ test/csl/disambiguate_InitializeWithButNoDisambiguation.expected view
@@ -0,0 +1,1 @@+(Doe, 1965b; Doe, 1965a)
test/csl/disambiguate_SkipAccessedYearSuffix.txt view
@@ -13,7 +13,7 @@ >>===== CSL =====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -29,8 +29,8 @@ </names> </macro> <macro name="publisher">- <text variable="publisher" suffix=", "/> - <text variable="publisher-place" suffix=", "/> + <text variable="publisher" suffix=", "/>+ <text variable="publisher-place" suffix=", "/> <text macro="date"/> </macro> <macro name="date">@@ -104,7 +104,8 @@ <!-- formatting citation --> <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year"> <layout>- <text value="BOGUS"/>+ <text macro="title" suffix=". "/>+ <text macro="publisher"/> </layout> </citation> <!-- formatting bibliography -->@@ -193,4 +194,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/disambiguate_YearCollapseWithInstitution.expected view
@@ -0,0 +1,3 @@+(Smith Co 2000a, 2000b, 2000c)+(Smith Co 2000b)+(Smith Co 2000c)
+ test/csl/disambiguate_YearSuffixAtTwoLevels.expected view
@@ -0,0 +1,1 @@+Smith et al. (1986a); Smith et al. (1986b); Smith et al. (1986c); Smith et al. (1986d)
+ test/csl/disambiguate_YearSuffixWithEtAlSubequent.expected view
@@ -0,0 +1,3 @@+(Smith 2000a, 2000b, 2000c)+(Smith 2000b)+(Smith 2000c)
+ test/csl/disambiguate_YearSuffixWithEtAlSubsequent.expected view
@@ -0,0 +1,3 @@+(Smith 2000a, 2000b, 2000c)+(Smith 2000b)+(Smith 2000c)
+ test/csl/flipflop_LeadingMarkupWithApostrophe.expected view
@@ -0,0 +1,1 @@+<i>Insha’Allah</i> is an Arabic phrase meaning “God willing.” Another Arabic word is <i>bukra</i>. Aalto
+ test/csl/flipflop_OrphanQuote.expected view
@@ -0,0 +1,1 @@+Nation of “Positive Obligations ” of State Under the European Convention on Human Rights (1)
+ test/csl/integration_FirstReferenceNoteNumberPositionChange.expected view
@@ -0,0 +1,5 @@+Doe, “Life of Doe” (1901).+Roe, “Life of Roe” (1900).+Doe, supra note 1.+Roe, supra note 2.+Snoakes, “Life of Snoakes” (1902).
+ test/csl/integration_IbidOnInsert.expected view
@@ -0,0 +1,4 @@+(Doe p. 12)+(Noakes p. 34)+(Snoakes p. 45)+(ibid.)
+ test/csl/magic_CapitalizeFirstOccurringTerm.expected view
@@ -0,0 +1,1 @@+and
+ test/csl/magic_NameSuffixNoComma.expected view
@@ -0,0 +1,1 @@+John, III Doe
+ test/csl/magic_NameSuffixWithComma.expected view
@@ -0,0 +1,1 @@+John,! Jr. Doe
+ test/csl/magic_PunctuationInQuoteNested.expected view
@@ -0,0 +1,1 @@+Doe. <i>“Book A”</i>. 1900.
test/csl/magic_SubsequentAuthorSubstituteNotFooled.txt view
@@ -6,7 +6,7 @@ >>===== RESULT =====>> <div class="csl-bib-body">- <div class="csl-entry">Silverstein, Theodore, tran. “Sir Gawain and the Green Knight.” Chicago: University of Chicago Press, 1974.</div>+ <div class="csl-entry">Silverstein, Theodore, trans. “Sir Gawain and the Green Knight.” Chicago: University of Chicago Press, 1974.</div> <div class="csl-entry">Soltes, Ori A., ed. “Georgia: Art and Civilization through the Ages.” London: Philip Wilson, 1999.</div> <div class="csl-entry">“The Chicago Manual of Style.” Chicago: University of Chicago Press, 1993.</div> </div>@@ -433,7 +433,7 @@ <text suffix=" " variable="title" /> <text variable="genre" /> </macro>- <citation + <citation disambiguate-add-names="true" et-al-min="4" et-al-subsequent-min="4"@@ -460,7 +460,7 @@ </choose> </layout> </citation>- <bibliography + <bibliography entry-spacing="0" et-al-min="11" et-al-use-first="7"@@ -557,4 +557,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/magic_TermCapitalizationWithPrefix.expected view
@@ -0,0 +1,4 @@+Doe (1965)+See ibid.+This has been said. Ibid.+ibid.
+ test/csl/name_CiteGroupDelimiterWithYearSuffixCollapse2.expected view
@@ -0,0 +1,1 @@+(Aalto 2015a–e; Bartleby 2010)
+ test/csl/name_EtAlWithCombined.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">John Doe。</div>+ <div class="csl-entry">——,Ziggy Zither 等點校。</div>+ <div class="csl-entry">田中太郎, Yossarian Yoda, 等翻譯員。</div>+</div>
+ test/csl/name_HebrewAnd.expected view
@@ -0,0 +1,1 @@+תפוח ו תפוז
+ test/csl/name_HyphenatedNonDroppingParticle1.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">al-One, Alan</div>+ <div class="csl-entry">Marple, Mary</div>+ <div class="csl-entry">Participle, Paul</div>+</div>
+ test/csl/name_HyphenatedNonDroppingParticle2.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">Alan al-One</div>+ <div class="csl-entry">Mary Marple</div>+ <div class="csl-entry">Paul Participle</div>+</div>
+ test/csl/name_InTextMarkupInitialize.expected view
@@ -0,0 +1,4 @@+<div class="csl-bib-body">+ <div class="csl-entry"><b>Doe</b>, <b>John</b>. Q.</div>+ <div class="csl-entry"><b>Doe</b>, <b>John</b>.-Q.</div>+</div>
+ test/csl/name_InTextMarkupNormalizeInitials.expected view
@@ -0,0 +1,4 @@+<div class="csl-bib-body">+ <div class="csl-entry"><b>Doe</b>, <b>J</b>. Q.</div>+ <div class="csl-entry"><b>Doe</b>, <b>J</b>.-Q.</div>+</div>
+ test/csl/name_ParseNames.expected view
@@ -0,0 +1,1 @@+Humboldt, Alexander von; van der Vlist, Eric; van Gogh, Vincent
+ test/csl/name_ParsedDroppingParticleWithApostrophe.expected view
@@ -0,0 +1,1 @@+François Hédelin d’(Aubignac)
+ test/csl/name_ParsedNonDroppingParticleWithApostrophe.expected view
@@ -0,0 +1,1 @@+<span style="font-variant:small-caps;">d’Aubignac</span> (François Hédelin)
+ test/csl/name_ParticleCaps3.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">Onename van One, Twoname van Two</div>+ <div class="csl-entry">Threename van Three, Fourname Van Four</div>+ <div class="csl-entry">Dick Van Dyke</div>+</div>
test/csl/name_ParticleCaps3.txt view
@@ -6,7 +6,7 @@ <div class="csl-bib-body"> <div class="csl-entry">Onename van One, Twoname van Two</div> <div class="csl-entry">Threename van Three, Fourname Van Four</div>- <div class="csl-entry">Dick Van Dyke</div>+ <div class="csl-entry">Dick "Van Dyke"</div> </div> <<==== RESULT ====<<
+ test/csl/name_ParticlesDemoteNonDroppingNever.expected view
@@ -0,0 +1,61 @@+<b>Familyname</b>, <i>Givenname al</i>+<b>Familyname</b>, <i>Givenname dos</i>+<b>Familyname</b>, <i>Givenname el</i>+<b>Las Familyname</b>, <i>Givenname de</i>+<b>Familyname</b>, <i>Givenname lo</i>+<b>Familyname</b>, <i>Givenname les</i>+<b>Familyname</b>, <i>Givenname il</i>+<b>del Familyname</b>, <i>Givenname</i>+<b>Familyname</b>, <i>Givenname dela</i>+<b>Familyname</b>, <i>Givenname della</i>+<b>Familyname</b>, <i>Givenname dello</i>+<b>Di Familyname</b>, <i>Givenname</i>+<b>Da Familyname</b>, <i>Givenname</i>+<b>Do Familyname</b>, <i>Givenname</i>+<b>Des Familyname</b>, <i>Givenname</i>+<b>Lou Familyname</b>, <i>Givenname</i>+<b>Pietro Familyname</b>, <i>Givenname</i>+<b>de Familyname</b>, <i>Givenname</i>+<b>La Familyname</b>, <i>Givenname de</i>+<b>Familyname</b>, <i>Givenname du</i>+<b>Familyname</b>, <i>Givenname d’</i>+<b>Le Familyname</b>, <i>Givenname</i>+<b>La Familyname</b>, <i>Givenname</i>+<b>L’Familyname</b>, <i>Givenname</i>+<b>Saint Familyname</b>, <i>Givenname</i>+<b>Sainte Familyname</b>, <i>Givenname</i>+<b>St. Familyname</b>, <i>Givenname</i>+<b>Ste. Familyname</b>, <i>Givenname</i>+<b>van Familyname</b>, <i>Givenname</i>+<b>van de Familyname</b>, <i>Givenname</i>+<b>van der Familyname</b>, <i>Givenname</i>+<b>van den Familyname</b>, <i>Givenname</i>+<b>vander Familyname</b>, <i>Givenname</i>+<b>v.d. Familyname</b>, <i>Givenname</i>+<b>vd Familyname</b>, <i>Givenname</i>+<b>van het Familyname</b>, <i>Givenname</i>+<b>ver Familyname</b>, <i>Givenname</i>+<b>ten Familyname</b>, <i>Givenname</i>+<b>ter Familyname</b>, <i>Givenname</i>+<b>te Familyname</b>, <i>Givenname</i>+<b>Familyname</b>, <i>Givenname op de</i>+<b>in de Familyname</b>, <i>Givenname</i>+<b>in ’t Familyname</b>, <i>Givenname</i>+<b>’t Familyname</b>, <i>Givenname</i>+<b>in het Familyname</b>, <i>Givenname</i>+<b>uit de Familyname</b>, <i>Givenname</i>+<b>uit den Familyname</b>, <i>Givenname</i>+<b>Familyname</b>, <i>Givenname von</i>+<b>Familyname</b>, <i>Givenname von der</i>+<b>Familyname</b>, <i>Givenname von dem</i>+<b>Familyname</b>, <i>Givenname von zu</i>+<b>v. Familyname</b>, <i>Givenname</i>+<b>v Familyname</b>, <i>Givenname</i>+<b>Familyname</b>, <i>Givenname vom</i>+<b>Familyname</b>, <i>Givenname das</i>+<b>Familyname</b>, <i>Givenname zum</i>+<b>Familyname</b>, <i>Givenname zur</i>+<b>Familyname</b>, <i>Givenname den</i>+<b>Familyname</b>, <i>Givenname der</i>+<b>Familyname</b>, <i>Givenname des</i>+<b>Familyname</b>, <i>Givenname auf den</i>
+ test/csl/number_OrdinalSpacing.expected view
@@ -0,0 +1,1 @@+Blah blah. 7th, p. 3rd–8thDD<i>ed</i>
+ test/csl/number_PlainHyphenOrEnDashAlwaysPlural.expected view
@@ -0,0 +1,1 @@+His Anonymous Life (1) pages 1–2 (cs:text) vs His Anonymous Life (1) pages 1–2 (cs:number); His Anonymous Life (2) pages i–ix (cs:text) vs His Anonymous Life (2) pages i–ix (cs:number); His Anonymous Life (3) page 3-B (cs:text) vs His Anonymous Life (3) page 3-B (cs:number); His Anonymous Life (4) pages Michaelson–Morely (cs:text) vs His Anonymous Life (4) pages Michaelson–Morely (cs:number)
test/csl/page_Chicago.txt view
@@ -22,6 +22,7 @@ Example P, at 13792–803 Example Q, at 1496–1504 Example R, at 2787–2816+Example S, at 11153–2359 <<===== RESULT =====<< @@ -116,6 +117,11 @@ { "id": "ITEM-18" }+ ],+ [+ {+ "id": "ITEM-19"+ } ] ] <<===== CITATION-ITEMS =====<<@@ -252,9 +258,15 @@ "type": "book" }, {- "id": "ITEM-18", - "page": "2787-816", - "title": "Example R", + "id": "ITEM-18",+ "page": "2787-816",+ "title": "Example R",+ "type": "book"+ },+ {+ "id": "ITEM-19",+ "page": "11153-12359",+ "title": "Example S", "type": "book" } ]
+ test/csl/position_FirstTrueOnlyOnce.expected view
@@ -0,0 +1,2 @@+Appleton “Tom Swift and His Electric Runabout” (1910).+ibid. p. 23.
+ test/csl/position_IbidInText.expected view
@@ -0,0 +1,3 @@+Appleton “Tom Swift and His Electric Runabout” (1910).+Bloggs “A Very Short Book Indeed” (2012).+Appleton “Tom Swift and His Electric Runabout” (1910).
+ test/csl/position_IbidSeparateCiteSameNote.expected view
@@ -0,0 +1,7 @@+[citation1-item1-note1] Appleton “Tom Swift and His Electric Runabout” (1910).+[citation2-item1-note2] ibid.+[citation3-item1-note2] ibid. page 33.+[citation4-item2-note3] Bloggs “A Very Short Book Indeed” (2012); [citation4-item1-note3] Appleton supra.+[citation5-item1-note4] Appleton supra page 99.+[citation6-item1-note4] Appleton supra.+[citation7-item1-note4] ibid.
+ test/csl/position_IbidWithLocator.expected view
@@ -0,0 +1,2 @@+Appleton “Tom Swift and His Electric Runabout” (1910).+ibid. p. 23.
+ test/csl/position_IbidWithMultipleSoloCitesInBackref.expected view
@@ -0,0 +1,4 @@+Aalto+Álvarez+Álvarez+ibid.
+ test/csl/position_IfIbidWithLocatorIsTrueThenIbidIsTrue.expected view
@@ -0,0 +1,2 @@+Appleton “Tom Swift and His Electric Runabout” (1910).+ibid.
+ test/csl/position_NearNoteSameNote.expected view
@@ -0,0 +1,3 @@+Plain+Vanilla:Book-A; Near+Ibid:Book-A+Plain+Vanilla:Book-B+Near+Ibid:Book-B; Plain+Vanilla:Book-A
+ test/csl/position_ResetNoteNumbers.expected view
@@ -0,0 +1,8 @@+Book A, n 1 (note 1)+ibid (note 2)+Book C, n 3 (note 3)+ibid (note 1)+Book A, n 1 (note 2)+ibid (note 3)+Book C, n 3 (note 4)+Book A, n 1 (note 5)
+ test/csl/punctuation_FullMontyQuotesIn.expected view
@@ -0,0 +1,47 @@+ENDING IN COLON+“colon”: colon+“period.”: colon+“semicolon”; colon+“exclamation”! colon+“question”? colon+“comma,”: colon++ENDING IN PERIOD+“colon”: period+“period.” period+“semicolon”; period+“exclamation”! period+“question”? period+“comma,”. period++ENDING IN SEMICOLON+“colon”:; semicolon+“period.”; semicolon+“semicolon”; semicolon+“exclamation”!; semicolon+“question”?; semicolon+“comma,”; semicolon++ENDING IN EXCLAMATION+“colon”! exclamation+“period.”! exclamation+“semicolon”! exclamation+“exclamation”! exclamation+“question”?! exclamation+“comma,”! exclamation++ENDING IN QUESTION+“colon”? question+“period.”? question+“semicolon”? question+“exclamation”!? question+“question”? question+“comma,”? question++ENDING IN COMMA+“colon”:, comma+“period.”, comma+“semicolon”;, comma+“exclamation”!, comma+“question”?, comma+“comma,” comma
+ test/csl/quotes_QuotesUnderQuotesFalse.expected view
@@ -0,0 +1,3 @@+<div class="csl-bib-body">+ <div class="csl-entry"> ’Title with ‘quotes’ in it’,.</div>+</div>
+ test/csl/sort_BibliographyCitationNumberDescending.expected view
@@ -0,0 +1,10 @@+<div class="csl-bib-body">+ <div class="csl-entry">[8] Book 008</div>+ <div class="csl-entry">[7] Book 007</div>+ <div class="csl-entry">[6] Book 005</div>+ <div class="csl-entry">[5] Book 002</div>+ <div class="csl-entry">[4] Book 006</div>+ <div class="csl-entry">[3] Book 004</div>+ <div class="csl-entry">[2] Book 003</div>+ <div class="csl-entry">[1] Book 001</div>+</div>
+ test/csl/sort_BibliographyCitationNumberDescendingViaCompositeMacro.expected view
@@ -0,0 +1,6 @@+<div class="csl-bib-body">+ <div class="csl-entry">[1] Aaaa</div>+ <div class="csl-entry">[2] Bbbb</div>+ <div class="csl-entry">[3] Xxxx</div>+ <div class="csl-entry">[4] Zzzz</div>+</div>
+ test/csl/sort_BibliographyCitationNumberDescendingViaMacro.expected view
@@ -0,0 +1,10 @@+<div class="csl-bib-body">+ <div class="csl-entry">[1] Book One</div>+ <div class="csl-entry">[2] Book Three</div>+ <div class="csl-entry">[3] Book Four</div>+ <div class="csl-entry">[4] Book Six</div>+ <div class="csl-entry">[5] Book Two</div>+ <div class="csl-entry">[6] Book Five</div>+ <div class="csl-entry">[7] Book Seven</div>+ <div class="csl-entry">[8] Book Eight</div>+</div>
+ test/csl/sort_OmittedBibRefMixedNumericStyle.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">1. Anderson, Book One</div>+ <div class="csl-entry">[CSL STYLE ERROR: reference with no printed form.]</div>+ <div class="csl-entry">3. Crane, Book Two</div>+</div>
test/csl/sort_OmittedBibRefMixedNumericStyle.txt view
@@ -2,6 +2,27 @@ bibliography <<==== MODE ====<< +>>==== DESCRIPTION ====>>++This depends on++1. identifying when citation-number is used,++2. outputting a particular error message in place of a reference that produces+ no output, to maintain citation-number sequencing, and++2. rendering the <bibliography/> <text variable="citation-number"/>+ for the omitted reference, ignoring the conditions that omitted the+ reference.++For an implementation example, see+https://github.com/zotero/citeproc-rs/blob/master/crates/proc/src/db.rs#L1414++Compare to the sort_OmittedBibRefNonNumericStyle test which has a similar+non-rendering reference but no citation-numbers.++<<==== DESCRIPTION ====<<+ >>==== RESULT ====>> <div class="csl-bib-body"> <div class="csl-entry">1. Anderson, Book One</div>@@ -27,7 +48,7 @@ <<==== CITATION-ITEMS ====<< >>==== CSL ====>>-<style +<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">@@ -120,4 +141,3 @@ >>===== VERSION =====>> 1.0 <<===== VERSION =====<<-
+ test/csl/sort_OmittedBibRefNonNumericStyle.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">Anderson, Book One</div>+ <div class="csl-entry">[CSL STYLE ERROR: reference with no printed form.]</div>+ <div class="csl-entry">Crane, Book Two</div>+</div>
+ test/csl/sort_RangeUnaffected.expected view
@@ -0,0 +1,2 @@+<sup>1–3</sup>+<sup>3</sup>
+ test/csl/substitute_SubstituteOnlyOnceTermEmpty.expected view
@@ -0,0 +1,1 @@+[CSL STYLE ERROR: reference with no printed form.]
+ test/csl/testers_FirstAutoGeneratedZoteroPluginTest.expected view
@@ -0,0 +1,2 @@+Center <sup>for</sup> History <sub>and</sub> New Media, “<b>Zotero</b> … ‘Quick Start’ & <span style="font-variant:small-caps;">Guide</span> 日本語,” 47, http://zotero.org/support/quick_start_guide.+John Smith, <i>Book A</i>, 2000; Center <sup>for</sup> History <sub>and</sub> New Media, “<b>Zotero</b> … ‘Quick Start’ & <span style="font-variant:small-caps;">Guide</span> 日本語.”
+ test/csl/testers_SecondAutoGeneratedZoteroPluginTest.expected view
@@ -0,0 +1,5 @@+<div class="csl-bib-body">+ <div class="csl-entry">Center <sup>for</sup> History <sub>and</sub> New Media. “<b>Zotero</b> … ‘Quick Start’ & <span style="font-variant:small-caps;">Guide</span> 日本語.” http://zotero.org/support/quick_start_guide.</div>+ <div class="csl-entry">Smith, John. <i>Book A</i>, 2000.</div>+ <div class="csl-entry">Smith, Steven. <i>Book A</i>, 2000.</div>+</div>
+ test/overrides/flipflop_NumericField.expected view
@@ -0,0 +1,1 @@+1er
+ test/overrides/fullstyles_ABdNT.expected view
@@ -0,0 +1,3 @@+<div class="csl-bib-body">+ <div class="csl-entry">COLE, S. J.; MOORE, R. Hydrological modelling using raingauge- and radar-based estimators of areal rainfall. <b>Journal of Hydrology</b>, v. 358, n. 3-4, p. 159–181, 2008.</div>+</div>