diff --git a/citeproc-java/src/test/java/de/undercouch/citeproc/FixturesTest.java b/citeproc-java/src/test/java/de/undercouch/citeproc/FixturesTest.java index cc07663b..2419cbc7 100644 --- a/citeproc-java/src/test/java/de/undercouch/citeproc/FixturesTest.java +++ b/citeproc-java/src/test/java/de/undercouch/citeproc/FixturesTest.java @@ -11,6 +11,9 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.io.input.BOMInputStream; +import org.apache.commons.text.translate.AggregateTranslator; +import org.apache.commons.text.translate.EntityArrays; +import org.apache.commons.text.translate.LookupTranslator; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Engine; import org.graalvm.polyglot.HostAccess; @@ -164,7 +167,8 @@ private static Map cslTestSuiteFileToData(File f) break; case "result": { - if (value.startsWith("")) || + value.matches(".*&#[0-9]+;.*")) { Map htmlMap = new HashMap<>(); htmlMap.put("html", value); result.put("result", htmlMap); @@ -299,6 +303,31 @@ public static Iterable data() { } } data.putAll(overrides); + } else if (data.get("result") instanceof Map && + ((Map)data.get("result")).get("html") != null) { + // rename "result" to "resultLegacy" and translate HTML + // output of citeproc-js to citeproc-java + Map resultLegacy = (Map)data.get("result"); + data.put("resultLegacy", resultLegacy); + + String html = (String)resultLegacy.get("html"); + AggregateTranslator at = new AggregateTranslator( + new LookupTranslator(EntityArrays.ISO8859_1_ESCAPE), + new LookupTranslator(EntityArrays.HTML40_EXTENDED_ESCAPE) + ); + html = html + .replace("", "") + .replace("", "") + .replace("", "") + .replace("", "") + .replace("", + "") + .replace("&", "&"); + html = at.translate(html); + + Map resultMap = new HashMap<>(); + resultMap.put("html", html); + data.put("result", resultMap); } data.put("__name", name); @@ -653,92 +682,92 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "bibheader_SecondFieldAlignWithAuthor", // "bibheader_SecondFieldAlignWithNumber", "bugreports_Abnt", - // "bugreports_AccidentalAllCaps", - // "bugreports_AllCapsLeakage", + "bugreports_AccidentalAllCaps", + "bugreports_AllCapsLeakage", // "bugreports_ApostropheOnParticle", - // "bugreports_ArabicLocale", - // "bugreports_AsaSpacing", - // "bugreports_AsmJournals", + "bugreports_ArabicLocale", + "bugreports_AsaSpacing", + "bugreports_AsmJournals", // "bugreports_AuthorPosition", - // "bugreports_AuthorYear", + "bugreports_AuthorYear", // "bugreports_AutomaticallyDeleteItemsFails", // "bugreports_BadCitationUpdate", // "bugreports_BadDelimiterBeforeCollapse", // "bugreports_ByBy", // "bugreports_CapsAfterOneWordPrefix", // "bugreports_ChicagoAuthorDateLooping", - // "bugreports_ChineseCharactersFamilyOnlyPluralLabel", + "bugreports_ChineseCharactersFamilyOnlyPluralLabel", // "bugreports_CitationSortsWithEtAl", // "bugreports_CollapseFailure", // "bugreports_ContainerTitleShort", - // "bugreports_ContentPunctuationDuplicate1", + "bugreports_ContentPunctuationDuplicate1", // "bugreports_ContextualPluralWithMainItemFields", // "bugreports_CreepingAddNames", // "bugreports_DelimiterOnLayout", - // "bugreports_DelimitersOnLocator", + "bugreports_DelimitersOnLocator", // "bugreports_DemoPageFullCiteCruftOnSubsequent", // "bugreports_DisambiguationAddNames", // "bugreports_DisambiguationAddNamesBibliography", // "bugreports_DoubleEncodedAngleBraces", - // "bugreports_DroppingGroupDelimiterSpace", - // "bugreports_DuplicateSpaces", - // "bugreports_DuplicateSpaces2", - // "bugreports_DuplicateSpaces3", + "bugreports_DroppingGroupDelimiterSpace", + "bugreports_DuplicateSpaces", + "bugreports_DuplicateSpaces2", + "bugreports_DuplicateSpaces3", // "bugreports_DuplicateTerminalPunctuationInBibliography", - // "bugreports_EmptyIfMatchNoneFail", + "bugreports_EmptyIfMatchNoneFail", // "bugreports_EmptyInput", // "bugreports_EnvAndUrb", // "bugreports_EtAlSubsequent", // "bugreports_FourAndFour", - // "bugreports_FrenchApostrophe", + "bugreports_FrenchApostrophe", // "bugreports_GreekStyleProblems", // "bugreports_GreekStyleTwoEditors", - // "bugreports_IeeePunctuation", + "bugreports_IeeePunctuation", // "bugreports_IllustratorInExtra", - // "bugreports_LabelsOutOfPlace", - // "bugreports_LegislationCrash", + "bugreports_LabelsOutOfPlace", + "bugreports_LegislationCrash", // "bugreports_MatchedAuthorAndDate", // "bugreports_MissingItemInJoin", // "bugreports_MovePunctuationInsideQuotesForLocator", // "bugreports_NoCaseEscape", - // "bugreports_NoEventInNestedMacroWithOldProcessor", - // "bugreports_NoTitle", + "bugreports_NoEventInNestedMacroWithOldProcessor", + "bugreports_NoTitle", // "bugreports_NonBreakingSpaceJoinFail", // "bugreports_NumberAffixEscape", // "bugreports_NumberInMacroWithVerticalAlign", // "bugreports_OldMhraDisambiguationFailure", // "bugreports_OverwriteCitationItems", // "bugreports_ProcessorHang1", - // "bugreports_SectionAndLocator", + "bugreports_SectionAndLocator", // "bugreports_SelfLink", // "bugreports_SimpleBib", // "bugreports_SingleQuote", // "bugreports_SingleQuoteXml", - // "bugreports_SingletonIfMatchNoneFail", + "bugreports_SingletonIfMatchNoneFail", // "bugreports_SmallCapsEscape", // "bugreports_SortSecondaryKey", - // "bugreports_SortSecondaryKeyBibliography", + "bugreports_SortSecondaryKeyBibliography", // "bugreports_SortedIeeeItalicsFail", - // "bugreports_StyleError001", - // "bugreports_ThesisUniversityAppearsTwice", - // "bugreports_TitleCase", + "bugreports_StyleError001", + "bugreports_ThesisUniversityAppearsTwice", + "bugreports_TitleCase", // "bugreports_TwoFullStops", - // "bugreports_UndefinedBeforeVal", - // "bugreports_UndefinedInName", - // "bugreports_UndefinedInName2", + "bugreports_UndefinedBeforeVal", + "bugreports_UndefinedInName", + "bugreports_UndefinedInName2", // "bugreports_UndefinedInName3", // "bugreports_UndefinedNotString", // "bugreports_UndefinedStr", - // "bugreports_UnisaHarvardInitialization", + "bugreports_UnisaHarvardInitialization", // "bugreports_YearSuffixInHarvard1", // "bugreports_YearSuffixLingers", - // "bugreports_disambiguate", - // "bugreports_effingBug", + "bugreports_disambiguate", + "bugreports_effingBug", // "bugreports_ikeyOne", - // "bugreports_parenthesis", + "bugreports_parenthesis", // name with quotes and particle // "bugreports_parseName", - // "bugreports_undefinedCrash", + "bugreports_undefinedCrash", // "collapse_AuthorCollapse", // "collapse_AuthorCollapseDifferentAuthorsOneWithEtAl", // "collapse_AuthorCollapseNoDate", @@ -779,20 +808,20 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD "condition_VariableAll", "condition_VariableAny", "condition_VariableNone", - // "date_Accessed", - // "date_AccessedCrash", + "date_Accessed", + "date_AccessedCrash", // "date_DateAD", // "date_DateBC", // "date_DateNoDateNoTest", - // "date_DateNoDateWithTest", + "date_DateNoDateWithTest", // "date_DayOrdinalDayOneOnly", - // "date_DisappearingBug", - // "date_EmptyStrings", + "date_DisappearingBug", + "date_EmptyStrings", // "date_IgnoreNonexistentSort", - // "date_InPress", - // "date_January", + "date_InPress", + "date_January", // "date_KeyVariable", - // "date_LiteralFailGracefullyIfNoValue", + "date_LiteralFailGracefullyIfNoValue", "date_LocalizedDateFormats-af-ZA", "date_LocalizedDateFormats-ar-AR", "date_LocalizedDateFormats-bg-BG", @@ -832,32 +861,32 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD "date_LocalizedDateFormats-vi-VN", "date_LocalizedDateFormats-zh-CN", "date_LocalizedDateFormats-zh-TW", - // "date_LocalizedNumericDefault", - // "date_LocalizedNumericDefaultMissingDay", - // "date_LocalizedNumericDefaultWithAffixes", - // "date_LocalizedNumericYear", - // "date_LocalizedNumericYearMonth", - // "date_LocalizedNumericYearRange", - // "date_LocalizedNumericYearWithAffixes", - // "date_LocalizedTextDefault", - // "date_LocalizedTextDefaultMissingDay", - // "date_LocalizedTextDefaultWithAffixes", + "date_LocalizedNumericDefault", + "date_LocalizedNumericDefaultMissingDay", + "date_LocalizedNumericDefaultWithAffixes", + "date_LocalizedNumericYear", + "date_LocalizedNumericYearMonth", + "date_LocalizedNumericYearRange", + "date_LocalizedNumericYearWithAffixes", + "date_LocalizedTextDefault", + "date_LocalizedTextDefaultMissingDay", + "date_LocalizedTextDefaultWithAffixes", // "date_LocalizedTextInStyleLocaleWithTextCase", // "date_LocalizedTextMonthFormOverride", - // "date_LocalizedTextYear", - // "date_LocalizedTextYearMonth", - // "date_LocalizedTextYearWithAffixes", + "date_LocalizedTextYear", + "date_LocalizedTextYearMonth", + "date_LocalizedTextYearWithAffixes", // "date_LocalizedWithInStyleFormatting", - // "date_LongMonth", + "date_LongMonth", // "date_LopsidedDataYearSuffixCollapse", - // "date_MaskNonexistentWithCondition", + "date_MaskNonexistentWithCondition", // "date_NegativeDateSort", // "date_NegativeDateSortViaMacro", // "date_NegativeDateSortViaMacroOnYearMonthOnly", - // "date_NoDate", + "date_NoDate", // "date_NonexistentSortReverseBibliography", // "date_NonexistentSortReverseCitation", - // "date_OtherAlone", + "date_OtherAlone", // "date_OtherWithDate", // "date_RangeDelimiter", // "date_SeasonRange1", @@ -867,26 +896,26 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "date_SortEmptyDatesBibliography", // "date_SortEmptyDatesCitation", "date_String", - // "date_TextFormFulldateDayRange", - // "date_TextFormFulldateMonthRange", - // "date_TextFormFulldateYearRange", - // "date_TextFormMonthdateMonthRange", - // "date_TextFormMonthdateYearRange", - // "date_TextFormYeardateYearRange", + "date_TextFormFulldateDayRange", + "date_TextFormFulldateMonthRange", + "date_TextFormFulldateYearRange", + "date_TextFormMonthdateMonthRange", + "date_TextFormMonthdateYearRange", + "date_TextFormYeardateYearRange", // "date_TextFormYeardateYearRangeOpen", // "date_Uncertain", // "date_VariousInvalidDates", // "date_YearSuffixDelimiter", // "date_YearSuffixImplicitWithNoDate", - // "date_YearSuffixImplicitWithNoDateOneOnly", + "date_YearSuffixImplicitWithNoDateOneOnly", // "date_YearSuffixWithNoDate", - // "decorations_AndTermUnaffectedByNameDecorations", + "decorations_AndTermUnaffectedByNameDecorations", // "decorations_Baseline", // "decorations_NestedQuotes", // "decorations_NestedQuotesInnerReverse", // "decorations_NoNormalWithoutDecoration", // "decorations_SimpleFlipFlop", - // "decorations_SimpleQuotes", + "decorations_SimpleQuotes", // "disambiguate_AddNamesFailure", // "disambiguate_AddNamesFailureWithAddGivenname", // "disambiguate_AddNamesSuccess", @@ -961,12 +990,12 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "display_AuthorAsHeading", "display_DisplayBlock", "display_LostSuffix", - // "display_SecondFieldAlignClone", + "display_SecondFieldAlignClone", // "display_SecondFieldAlignMigratePunctuation", - // "etal_CitationAndBibliographyDecorationsInBibliography", + "etal_CitationAndBibliographyDecorationsInBibliography", // "etal_CitationAndBibliographyDecorationsInCitation", // "etal_ShortFormOfName", - // "etal_UseZeroFirst", + "etal_UseZeroFirst", // "flipflop_Apostrophes", // "flipflop_BoldfaceNodeLevelMarkup", // "flipflop_CompleteCiteInPrefix", @@ -985,15 +1014,15 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "flipflop_SingleQuotesOnItalics", // "flipflop_SmallCaps", // "flipflop_StartingApostrophe", - // "form_ShortTitleOnly", - // "form_TitleShort", - // "form_TitleShortNoLong", - // "form_TitleTestNoLongFalse", + "form_ShortTitleOnly", + "form_TitleShort", + "form_TitleShortNoLong", + "form_TitleTestNoLongFalse", // "fullstyles_ABdNT", - // "fullstyles_APA", - // "fullstyles_ChicagoArticleTitleQuestion", + "fullstyles_APA", + "fullstyles_ChicagoArticleTitleQuestion", // "fullstyles_ChicagoAuthorDateSimple", - // "fullstyles_ChicagoNoteWithBibliographyWithPublisher", + "fullstyles_ChicagoNoteWithBibliographyWithPublisher", "group_ComplexNesting", // "group_LegalWithAuthorDate", "group_ShortOutputOnly", @@ -1016,139 +1045,139 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "integration_SubsequentWhenInterveningFootnote", // "integration_YearSuffixOnOffOn", // "label_CollapsedPageNumberPluralDetection", - // "label_CompactNamesAfterFullNames", + "label_CompactNamesAfterFullNames", // "label_EditorTranslator1", - // "label_EditorTranslator2", + "label_EditorTranslator2", // "label_EmptyLabelVanish", - // "label_EmptyLabelVanishPage", - // "label_ImplicitForm", - // "label_MissingReturnsEmpty", + "label_EmptyLabelVanishPage", + "label_ImplicitForm", + "label_MissingReturnsEmpty", // "label_NameLabelThroughSubstitute", - // "label_NoFirstCharCapWithInTextClass", - // "label_NonexistentNameVariableLabel", + "label_NoFirstCharCapWithInTextClass", + "label_NonexistentNameVariableLabel", // "label_PageWithEmbeddedLabel", // "label_PluralNumberOfVolumes", - // "label_PluralPagesWithAlphaPrefix", - // "label_PluralWithAmpersand", - // "label_PluralWithAnd", - // "label_PluralWithCommaAnd", + "label_PluralPagesWithAlphaPrefix", + "label_PluralWithAmpersand", + "label_PluralWithAnd", + "label_PluralWithCommaAnd", // "label_PluralWithCommaLocalizedAnd", // "label_PluralWithLocalizedAmpersand", // "label_PluralWithLocalizedAnd", - // "locale_EmptyDate", - // "locale_EmptyPlusOverrideDate", + "locale_EmptyDate", + "locale_EmptyPlusOverrideDate", // "locale_EmptyPlusOverrideStyleOpt", // "locale_EmptyPlusOverrideTerm", - // "locale_EmptyStyleOpt", - // "locale_EmptyTerm", + "locale_EmptyStyleOpt", + "locale_EmptyTerm", // "locale_ForceEmptyAndOthersTerm", // "locale_ForceEmptyEtAlTerm", // "locale_NonExistentLocaleDef", - // "locale_OverloadWithEmptyString", - // "locale_PageRangeDelimiterTermDefined", - // "locale_PageRangeDelimiterTermFrenchUndef", - // "locale_PageRangeDelimiterTermUndefined", - // "locale_SpecificDate", - // "locale_SpecificStyleOpt", - // "locale_SpecificTerm", - // "locale_TitleCaseEmptyLangEmptyLocale", - // "locale_TitleCaseEmptyLangNonEnglishLocale", - // "locale_TitleCaseGarbageLangEmptyLocale", + "locale_OverloadWithEmptyString", + "locale_PageRangeDelimiterTermDefined", + "locale_PageRangeDelimiterTermFrenchUndef", + "locale_PageRangeDelimiterTermUndefined", + "locale_SpecificDate", + "locale_SpecificStyleOpt", + "locale_SpecificTerm", + "locale_TitleCaseEmptyLangEmptyLocale", + "locale_TitleCaseEmptyLangNonEnglishLocale", + "locale_TitleCaseGarbageLangEmptyLocale", // "locale_TitleCaseGarbageLangEnglishLocale", - // "locale_TitleCaseGarbageLangNonEnglishLocale", - // "locale_TitleCaseNonEnglishLangUpperEmptyLocale", - // "locale_UnknownTerm", + "locale_TitleCaseGarbageLangNonEnglishLocale", + "locale_TitleCaseNonEnglishLangUpperEmptyLocale", + "locale_UnknownTerm", // "locator_SimpleLocators", // "locator_SingularEmbeddedLabelAfterPlural", - // "locator_TermSelection", + "locator_TermSelection", // "locator_TrickyEntryForPlurals", // "locator_WithLeadingSpace", // "locator_WorkaroundTestForSubVerbo", - // "magic_AllowRepeatDateRenderings", - // "magic_CapitalizeFirstOccurringNameParticle", + "magic_AllowRepeatDateRenderings", + "magic_CapitalizeFirstOccurringNameParticle", // "magic_CapitalizeFirstOccurringTerm", // "magic_CitationLabelInBibliography", // "magic_CitationLabelInCitation", - // "magic_EntrySpacingDouble", - // "magic_HangingIndent", + "magic_EntrySpacingDouble", + "magic_HangingIndent", // "magic_ImplicitYearSuffixDelimiter", // "magic_ImplicitYearSuffixExplicitDelimiter", - // "magic_LineSpacingDouble", - // "magic_LineSpacingTripleStretch", + "magic_LineSpacingDouble", + "magic_LineSpacingTripleStretch", // "magic_NameParticle", // "magic_NameSuffixNoComma", // "magic_NameSuffixWithComma", - // "magic_NumberRangeEnglish", - // "magic_NumberRangeFrench", - // "magic_PunctuationInQuoteDefaultEnglishDelimiter", - // "magic_PunctuationInQuoteDefaultEnglishSuffix", - // "magic_PunctuationInQuoteDelimiterTrue", - // "magic_PunctuationInQuoteFalse", - // "magic_PunctuationInQuoteFalseSuppressExtra", + "magic_NumberRangeEnglish", + "magic_NumberRangeFrench", + "magic_PunctuationInQuoteDefaultEnglishDelimiter", + "magic_PunctuationInQuoteDefaultEnglishSuffix", + "magic_PunctuationInQuoteDelimiterTrue", + "magic_PunctuationInQuoteFalse", + "magic_PunctuationInQuoteFalseSuppressExtra", // "magic_PunctuationInQuoteNested", - // "magic_PunctuationInQuoteSuffixTrue", - // "magic_PunctuationInQuoteTrueSuppressExtra", - // "magic_QuotesAndBraces1", - // "magic_QuotesAndBraces2", - // "magic_SecondFieldAlign", + "magic_PunctuationInQuoteSuffixTrue", + "magic_PunctuationInQuoteTrueSuppressExtra", + "magic_QuotesAndBraces1", + "magic_QuotesAndBraces2", + "magic_SecondFieldAlign", // "magic_StripPeriodsExcludeAffixes", - // "magic_StripPeriodsFalse", + "magic_StripPeriodsFalse", // "magic_StripPeriodsTrue", // "magic_StripPeriodsTrueShortForm", // "magic_SubsequentAuthorSubstitute", - // "magic_SubsequentAuthorSubstituteNotFooled", + "magic_SubsequentAuthorSubstituteNotFooled", // "magic_SubsequentAuthorSubstituteOfTitleField", // "magic_SuperscriptChars", - // "magic_SuppressDuplicateVariableRendering", + "magic_SuppressDuplicateVariableRendering", // "magic_SuppressLayoutDelimiterIfPrefixComma", // "magic_TermCapitalizationWithPrefix", - // "magic_TextRangeEnglish", - // "magic_TextRangeFrench", + "magic_TextRangeEnglish", + "magic_TextRangeFrench", // "name_AfterInvertedName", - // "name_AllCapsInitialsUntouched", - // "name_AndTextDelimiterPrecedesLastAlways", - // "name_ApostropheInGivenName", - // "name_ArabicShortForms", + "name_AllCapsInitialsUntouched", + "name_AndTextDelimiterPrecedesLastAlways", + "name_ApostropheInGivenName", + "name_ArabicShortForms", // "name_ArticularNameAsSortOrder", - // "name_ArticularPlain", - // "name_ArticularShortForm", - // "name_ArticularShortFormCommaSuffix", + "name_ArticularPlain", + "name_ArticularShortForm", + "name_ArticularShortFormCommaSuffix", // "name_ArticularWithComma", // "name_ArticularWithCommaNameAsSortOrder", // "name_AsianGlyphs", - // "name_AuthorCount", + "name_AuthorCount", // "name_AuthorCountWithMultipleVariables", // "name_AuthorCountWithSameVarContentAndCombinedTermFail", - // "name_AuthorCountWithSameVarContentAndCombinedTermSucceed", + "name_AuthorCountWithSameVarContentAndCombinedTermSucceed", // "name_AuthorEditorCount", - // "name_BibliographyNameFormNeverShrinks", - // "name_CelticClanName", + "name_BibliographyNameFormNeverShrinks", + "name_CelticClanName", // "name_CeltsAndToffsCrowdedInitials", // "name_CeltsAndToffsNoHyphens", // "name_CeltsAndToffsSpacedInitials", - // "name_CeltsAndToffsWithHyphens", + "name_CeltsAndToffsWithHyphens", // "name_CiteGroupDelimiterWithYearCollapse", // "name_CiteGroupDelimiterWithYearSuffixCollapse", // "name_CiteGroupDelimiterWithYearSuffixCollapse2", // "name_CiteGroupDelimiterWithYearSuffixCollapse3", // "name_CollapseRoleLabels", - // "name_Delimiter", - // "name_EditorTranslatorBoth", - // "name_EditorTranslatorSameEmptyTerm", + "name_Delimiter", + "name_EditorTranslatorBoth", + "name_EditorTranslatorSameEmptyTerm", // "name_EditorTranslatorSameWithTerm", // "name_EditorTranslatorWithTranslatorOnlyBib", - // "name_EtAlKanji", + "name_EtAlKanji", // "name_EtAlUseLast", // "name_EtAlWithCombined", - // "name_FirstInitialFullForm", - // "name_FormattingOfParticles", - // "name_GreekSimple", + "name_FirstInitialFullForm", + "name_FormattingOfParticles", + "name_GreekSimple", // "name_HebrewAnd", // "name_HierarchicalDelimiter", - // "name_HyphenatedFirstName", + "name_HyphenatedFirstName", // "name_HyphenatedNonDroppingParticle1", // "name_HyphenatedNonDroppingParticle2", - // "name_InheritAttributesEtAlStyle", + "name_InheritAttributesEtAlStyle", "name_InitialsInitializeFalse", "name_InitialsInitializeFalseEmpty", "name_InitialsInitializeFalsePeriod", @@ -1157,51 +1186,51 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD "name_InitialsInitializeTrueEmpty", "name_InitialsInitializeTruePeriod", "name_InitialsInitializeTruePeriodSpace", - // "name_Institution", + "name_Institution", // "name_InstitutionDecoration", - // "name_LabelAfterPlural", - // "name_LabelAfterPluralDecorations", - // "name_LabelFormatBug", + "name_LabelAfterPlural", + "name_LabelAfterPluralDecorations", + "name_LabelFormatBug", // "name_LiteralWithComma", // "name_LongAbbreviation", // "name_LowercaseSurnameSuffix", - // "name_MultipleLiteral", - // "name_NoNameNode", + "name_MultipleLiteral", + "name_NoNameNode", // "name_NonDroppingParticleDefault", "name_OnlyFamilyname", "name_OnlyGivenname", - // "name_OverridingHierarchicalDelimiter", + "name_OverridingHierarchicalDelimiter", // "name_ParseNames", - // "name_ParsedCommaDelimitedDroppingParticleSortOrderingWithoutAffixes", - // "name_ParsedDroppingParticleWithAffixes", + "name_ParsedCommaDelimitedDroppingParticleSortOrderingWithoutAffixes", + "name_ParsedDroppingParticleWithAffixes", // "name_ParsedDroppingParticleWithApostrophe", - // "name_ParsedNonDroppingParticleWithAffixes", + "name_ParsedNonDroppingParticleWithAffixes", // "name_ParsedNonDroppingParticleWithApostrophe", - // "name_ParsedUpperCaseNonDroppingParticle", - // "name_ParticleCaps1", - // "name_ParticleCaps2", + "name_ParsedUpperCaseNonDroppingParticle", + "name_ParticleCaps1", + "name_ParticleCaps2", // "name_ParticleCaps3", // "name_ParticleFormatting", - // "name_ParticleParse1", + "name_ParticleParse1", // "name_ParticlesDemoteNonDroppingNever", "name_PeriodAfterInitials", - // "name_QuashOrdinaryVariableRenderedViaSubstitute", - // "name_RomanianTwo", - // "name_SemicolonWithAnd", - // "name_SplitInitials", - // "name_StaticParticles", + "name_QuashOrdinaryVariableRenderedViaSubstitute", + "name_RomanianTwo", + "name_SemicolonWithAnd", + "name_SplitInitials", + "name_StaticParticles", // "name_SubsequentAuthorSubstituteMultipleNames", // "name_SubstituteInheritLabel", - // "name_SubstituteMacroInheritDecorations", - // "name_SubstituteName", - // "name_SubstituteOnDateGroupSpanFail", - // "name_SubstituteOnGroupSpanGroupSpanFail", - // "name_SubstituteOnMacroGroupSpanFail", + "name_SubstituteMacroInheritDecorations", + "name_SubstituteName", + "name_SubstituteOnDateGroupSpanFail", + "name_SubstituteOnGroupSpanGroupSpanFail", + "name_SubstituteOnMacroGroupSpanFail", // "name_SubstituteOnNamesSingletonGroupSpanFail", // "name_SubstituteOnNamesSpanGroupSpanFail", // "name_SubstituteOnNamesSpanNamesSpanFail", - // "name_SubstituteOnNumberGroupSpanFail", - // "name_TwoRolesSameRenderingSeparateRoleLabels", + "name_SubstituteOnNumberGroupSpanFail", + "name_TwoRolesSameRenderingSeparateRoleLabels", "name_WesternArticularLowercase", "name_WesternPrimaryFontStyle", "name_WesternPrimaryFontStyleTwoAuthors", @@ -1211,129 +1240,129 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD "name_namepartAffixes", // "name_namepartAffixesNameAsSortOrder", // "name_namepartAffixesNameAsSortOrderDemoteNonDroppingParticle", - // "nameattr_AndOnBibliographyInBibliography", - // "nameattr_AndOnBibliographyInCitation", - // "nameattr_AndOnCitationInBibliography", - // "nameattr_AndOnCitationInCitation", - // "nameattr_AndOnNamesInBibliography", - // "nameattr_AndOnNamesInCitation", - // "nameattr_AndOnStyleInBibliography", - // "nameattr_AndOnStyleInCitation", - // "nameattr_DelimiterPrecedesEtAlOnBibliographyInBibliography", - // "nameattr_DelimiterPrecedesEtAlOnBibliographyInCitation", - // "nameattr_DelimiterPrecedesEtAlOnCitationInBibliography", - // "nameattr_DelimiterPrecedesEtAlOnCitationInCitation", - // "nameattr_DelimiterPrecedesEtAlOnNamesInBibliography", - // "nameattr_DelimiterPrecedesEtAlOnNamesInCitation", - // "nameattr_DelimiterPrecedesEtAlOnStyleInBibliography", - // "nameattr_DelimiterPrecedesEtAlOnStyleInCitation", - // "nameattr_DelimiterPrecedesLastOnBibliographyInBibliography", - // "nameattr_DelimiterPrecedesLastOnBibliographyInCitation", - // "nameattr_DelimiterPrecedesLastOnCitationInBibliography", - // "nameattr_DelimiterPrecedesLastOnCitationInCitation", - // "nameattr_DelimiterPrecedesLastOnNamesInBibliography", - // "nameattr_DelimiterPrecedesLastOnNamesInCitation", - // "nameattr_DelimiterPrecedesLastOnStyleInBibliography", - // "nameattr_DelimiterPrecedesLastOnStyleInCitation", - // "nameattr_EtAlMinOnBibliographyInBibliography", - // "nameattr_EtAlMinOnBibliographyInCitation", - // "nameattr_EtAlMinOnCitationInBibliography", - // "nameattr_EtAlMinOnCitationInCitation", - // "nameattr_EtAlMinOnNamesInBibliography", - // "nameattr_EtAlMinOnNamesInCitation", - // "nameattr_EtAlMinOnStyleInBibliography", - // "nameattr_EtAlMinOnStyleInCitation", - // "nameattr_EtAlSubsequentMinOnBibliographyInBibliography", - // "nameattr_EtAlSubsequentMinOnBibliographyInCitation", - // "nameattr_EtAlSubsequentMinOnCitationInBibliography", + "nameattr_AndOnBibliographyInBibliography", + "nameattr_AndOnBibliographyInCitation", + "nameattr_AndOnCitationInBibliography", + "nameattr_AndOnCitationInCitation", + "nameattr_AndOnNamesInBibliography", + "nameattr_AndOnNamesInCitation", + "nameattr_AndOnStyleInBibliography", + "nameattr_AndOnStyleInCitation", + "nameattr_DelimiterPrecedesEtAlOnBibliographyInBibliography", + "nameattr_DelimiterPrecedesEtAlOnBibliographyInCitation", + "nameattr_DelimiterPrecedesEtAlOnCitationInBibliography", + "nameattr_DelimiterPrecedesEtAlOnCitationInCitation", + "nameattr_DelimiterPrecedesEtAlOnNamesInBibliography", + "nameattr_DelimiterPrecedesEtAlOnNamesInCitation", + "nameattr_DelimiterPrecedesEtAlOnStyleInBibliography", + "nameattr_DelimiterPrecedesEtAlOnStyleInCitation", + "nameattr_DelimiterPrecedesLastOnBibliographyInBibliography", + "nameattr_DelimiterPrecedesLastOnBibliographyInCitation", + "nameattr_DelimiterPrecedesLastOnCitationInBibliography", + "nameattr_DelimiterPrecedesLastOnCitationInCitation", + "nameattr_DelimiterPrecedesLastOnNamesInBibliography", + "nameattr_DelimiterPrecedesLastOnNamesInCitation", + "nameattr_DelimiterPrecedesLastOnStyleInBibliography", + "nameattr_DelimiterPrecedesLastOnStyleInCitation", + "nameattr_EtAlMinOnBibliographyInBibliography", + "nameattr_EtAlMinOnBibliographyInCitation", + "nameattr_EtAlMinOnCitationInBibliography", + "nameattr_EtAlMinOnCitationInCitation", + "nameattr_EtAlMinOnNamesInBibliography", + "nameattr_EtAlMinOnNamesInCitation", + "nameattr_EtAlMinOnStyleInBibliography", + "nameattr_EtAlMinOnStyleInCitation", + "nameattr_EtAlSubsequentMinOnBibliographyInBibliography", + "nameattr_EtAlSubsequentMinOnBibliographyInCitation", + "nameattr_EtAlSubsequentMinOnCitationInBibliography", // "nameattr_EtAlSubsequentMinOnCitationInCitation", - // "nameattr_EtAlSubsequentMinOnNamesInBibliography", - // "nameattr_EtAlSubsequentMinOnStyleInBibliography", + "nameattr_EtAlSubsequentMinOnNamesInBibliography", + "nameattr_EtAlSubsequentMinOnStyleInBibliography", // "nameattr_EtAlSubsequentMinOnStyleInCitation", - // "nameattr_EtAlSubsequentUseFirstOnBibliographyInBibliography", - // "nameattr_EtAlSubsequentUseFirstOnBibliographyInCitation", - // "nameattr_EtAlSubsequentUseFirstOnCitationInBibliography", + "nameattr_EtAlSubsequentUseFirstOnBibliographyInBibliography", + "nameattr_EtAlSubsequentUseFirstOnBibliographyInCitation", + "nameattr_EtAlSubsequentUseFirstOnCitationInBibliography", // "nameattr_EtAlSubsequentUseFirstOnCitationInCitation", - // "nameattr_EtAlSubsequentUseFirstOnStyleInBibliography", + "nameattr_EtAlSubsequentUseFirstOnStyleInBibliography", // "nameattr_EtAlSubsequentUseFirstOnStyleInCitation", - // "nameattr_EtAlUseFirstOnBibliographyInBibliography", - // "nameattr_EtAlUseFirstOnBibliographyInCitation", - // "nameattr_EtAlUseFirstOnCitationInBibliography", - // "nameattr_EtAlUseFirstOnCitationInCitation", - // "nameattr_EtAlUseFirstOnNamesInBibliography", - // "nameattr_EtAlUseFirstOnNamesInCitation", - // "nameattr_EtAlUseFirstOnStyleInBibliography", - // "nameattr_EtAlUseFirstOnStyleInCitation", - // "nameattr_InitializeWithOnBibliographyInBibliography", - // "nameattr_InitializeWithOnBibliographyInCitation", - // "nameattr_InitializeWithOnCitationInBibliography", - // "nameattr_InitializeWithOnCitationInCitation", - // "nameattr_InitializeWithOnNamesInBibliography", - // "nameattr_InitializeWithOnNamesInCitation", - // "nameattr_InitializeWithOnStyleInBibliography", - // "nameattr_InitializeWithOnStyleInCitation", - // "nameattr_NameAsSortOrderOnBibliographyInBibliography", - // "nameattr_NameAsSortOrderOnBibliographyInCitation", - // "nameattr_NameAsSortOrderOnCitationInBibliography", - // "nameattr_NameAsSortOrderOnCitationInCitation", - // "nameattr_NameAsSortOrderOnNamesInBibliography", - // "nameattr_NameAsSortOrderOnNamesInCitation", - // "nameattr_NameAsSortOrderOnStyleInBibliography", - // "nameattr_NameAsSortOrderOnStyleInCitation", + "nameattr_EtAlUseFirstOnBibliographyInBibliography", + "nameattr_EtAlUseFirstOnBibliographyInCitation", + "nameattr_EtAlUseFirstOnCitationInBibliography", + "nameattr_EtAlUseFirstOnCitationInCitation", + "nameattr_EtAlUseFirstOnNamesInBibliography", + "nameattr_EtAlUseFirstOnNamesInCitation", + "nameattr_EtAlUseFirstOnStyleInBibliography", + "nameattr_EtAlUseFirstOnStyleInCitation", + "nameattr_InitializeWithOnBibliographyInBibliography", + "nameattr_InitializeWithOnBibliographyInCitation", + "nameattr_InitializeWithOnCitationInBibliography", + "nameattr_InitializeWithOnCitationInCitation", + "nameattr_InitializeWithOnNamesInBibliography", + "nameattr_InitializeWithOnNamesInCitation", + "nameattr_InitializeWithOnStyleInBibliography", + "nameattr_InitializeWithOnStyleInCitation", + "nameattr_NameAsSortOrderOnBibliographyInBibliography", + "nameattr_NameAsSortOrderOnBibliographyInCitation", + "nameattr_NameAsSortOrderOnCitationInBibliography", + "nameattr_NameAsSortOrderOnCitationInCitation", + "nameattr_NameAsSortOrderOnNamesInBibliography", + "nameattr_NameAsSortOrderOnNamesInCitation", + "nameattr_NameAsSortOrderOnStyleInBibliography", + "nameattr_NameAsSortOrderOnStyleInCitation", // "nameattr_NameDelimiterOnBibliographyInBibliography", // "nameattr_NameDelimiterOnBibliographyInCitation", - // "nameattr_NameDelimiterOnCitationInBibliography", + "nameattr_NameDelimiterOnCitationInBibliography", // "nameattr_NameDelimiterOnCitationInCitation", - // "nameattr_NameDelimiterOnNamesInBibliography", - // "nameattr_NameDelimiterOnNamesInCitation", + "nameattr_NameDelimiterOnNamesInBibliography", + "nameattr_NameDelimiterOnNamesInCitation", // "nameattr_NameDelimiterOnStyleInBibliography", // "nameattr_NameDelimiterOnStyleInCitation", // "nameattr_NameFormOnBibliographyInBibliography", - // "nameattr_NameFormOnBibliographyInCitation", - // "nameattr_NameFormOnCitationInBibliography", + "nameattr_NameFormOnBibliographyInCitation", + "nameattr_NameFormOnCitationInBibliography", // "nameattr_NameFormOnCitationInCitation", - // "nameattr_NameFormOnNamesInBibliography", - // "nameattr_NameFormOnNamesInCitation", + "nameattr_NameFormOnNamesInBibliography", + "nameattr_NameFormOnNamesInCitation", // "nameattr_NameFormOnStyleInBibliography", // "nameattr_NameFormOnStyleInCitation", // "nameattr_NamesDelimiterOnBibliographyInBibliography", - // "nameattr_NamesDelimiterOnBibliographyInCitation", - // "nameattr_NamesDelimiterOnCitationInBibliography", + "nameattr_NamesDelimiterOnBibliographyInCitation", + "nameattr_NamesDelimiterOnCitationInBibliography", // "nameattr_NamesDelimiterOnCitationInCitation", - // "nameattr_NamesDelimiterOnNamesInBibliography", - // "nameattr_NamesDelimiterOnNamesInCitation", + "nameattr_NamesDelimiterOnNamesInBibliography", + "nameattr_NamesDelimiterOnNamesInCitation", // "nameattr_NamesDelimiterOnStyleInBibliography", // "nameattr_NamesDelimiterOnStyleInCitation", - // "nameattr_SortSeparatorOnBibliographyInBibliography", - // "nameattr_SortSeparatorOnBibliographyInCitation", - // "nameattr_SortSeparatorOnCitationInBibliography", - // "nameattr_SortSeparatorOnCitationInCitation", - // "nameattr_SortSeparatorOnNamesInBibliography", - // "nameattr_SortSeparatorOnNamesInCitation", - // "nameattr_SortSeparatorOnStyleInBibliography", - // "nameattr_SortSeparatorOnStyleInCitation", - // "nameorder_Long", + "nameattr_SortSeparatorOnBibliographyInBibliography", + "nameattr_SortSeparatorOnBibliographyInCitation", + "nameattr_SortSeparatorOnCitationInBibliography", + "nameattr_SortSeparatorOnCitationInCitation", + "nameattr_SortSeparatorOnNamesInBibliography", + "nameattr_SortSeparatorOnNamesInCitation", + "nameattr_SortSeparatorOnStyleInBibliography", + "nameattr_SortSeparatorOnStyleInCitation", + "nameorder_Long", // "nameorder_LongNameAsSortDemoteDisplayAndSort", // "nameorder_LongNameAsSortDemoteNever", - // "nameorder_Short", - // "nameorder_ShortDemoteDisplayAndSort", - // "nameorder_ShortNameAsSortDemoteNever", - // "namespaces_NonNada3", + "nameorder_Short", + "nameorder_ShortDemoteDisplayAndSort", + "nameorder_ShortNameAsSortDemoteNever", + "namespaces_NonNada3", // "number_EditionSort", - // "number_FailingDelimiters", - // "number_IsNumericWithAlpha", + "number_FailingDelimiters", + "number_IsNumericWithAlpha", // "number_LeadingZeros", // "number_MixedPageRange", - // "number_MixedText", + "number_MixedText", // "number_NewOrdinalsEdition", // "number_NewOrdinalsWithGenderChange", // "number_OrdinalSpacing", - // "number_PageFirst", - // "number_PageRange", + "number_PageFirst", + "number_PageRange", // "number_PlainHyphenOrEnDashAlwaysPlural", - // "number_PreserveDelimiter", + "number_PreserveDelimiter", // "number_SeparateOrdinalNamespaces", - // "number_SimpleNumberArabic", + "number_SimpleNumberArabic", // "number_SimpleNumberOrdinalLong", // "number_SimpleNumberOrdinalShort", // "number_SimpleNumberRoman", @@ -1368,31 +1397,31 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD "position_IbidWithSuffix", // "position_IfIbidIsTrueThenSubsequentIsTrue", // "position_IfIbidWithLocatorIsTrueThenIbidIsTrue", - // "position_NearNoteFalse", + "position_NearNoteFalse", // "position_NearNoteSameNote", // "position_NearNoteTrue", - // "position_NearNoteUnsupported", - // "position_NearNoteWithPlugin", + "position_NearNoteUnsupported", + "position_NearNoteWithPlugin", // "position_ResetNoteNumbers", "position_TrueInCitation", - // "punctuation_DateStripPeriods", + "punctuation_DateStripPeriods", // "punctuation_DefaultYearSuffixDelimiter", // "punctuation_DelimiterWithStripPeriodsAndSubstitute1", - // "punctuation_DelimiterWithStripPeriodsAndSubstitute2", - // "punctuation_DelimiterWithStripPeriodsAndSubstitute3", - // "punctuation_DoNotSuppressColonAfterPeriod", - // "punctuation_FieldDuplicates", + "punctuation_DelimiterWithStripPeriodsAndSubstitute2", + "punctuation_DelimiterWithStripPeriodsAndSubstitute3", + "punctuation_DoNotSuppressColonAfterPeriod", + "punctuation_FieldDuplicates", // "punctuation_FrenchOrthography", - // "punctuation_FullMontyField", - // "punctuation_FullMontyPlain", + "punctuation_FullMontyField", + "punctuation_FullMontyPlain", // "punctuation_FullMontyQuotesIn", - // "punctuation_FullMontyQuotesOut", - // "punctuation_NoSuppressOfPeriodBeforeSemicolon", - // "punctuation_OnMacro", - // "punctuation_SemicolonDelimiter", + "punctuation_FullMontyQuotesOut", + "punctuation_NoSuppressOfPeriodBeforeSemicolon", + "punctuation_OnMacro", + "punctuation_SemicolonDelimiter", // "punctuation_SuppressPrefixPeriodForDelimiterSemicolon", - // "quotes_Punctuation", - // "quotes_PunctuationNasty", + "quotes_Punctuation", + "quotes_PunctuationNasty", // "quotes_PunctuationWithInnerQuote", // "quotes_QuotesUnderQuotesFalse", "simplespace_case1", @@ -1400,40 +1429,40 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "sort_AguStyleReverseGroups", // "sort_AuthorDateWithYearSuffix", // "sort_BibliographyCitationNumberDescending", - // "sort_BibliographyCitationNumberDescendingSecondary", - // "sort_BibliographyCitationNumberDescendingViaCompositeMacro", - // "sort_BibliographyCitationNumberDescendingViaMacro", + "sort_BibliographyCitationNumberDescendingSecondary", + "sort_BibliographyCitationNumberDescendingViaCompositeMacro", + "sort_BibliographyCitationNumberDescendingViaMacro", // "sort_BibliographyNosortOption", - // "sort_BibliographyResortOnUpdate", - // "sort_CaseInsensitiveBibliography", - // "sort_CaseInsensitiveCitation", + "sort_BibliographyResortOnUpdate", + "sort_CaseInsensitiveBibliography", + "sort_CaseInsensitiveCitation", // "sort_ChangeInNameSort", // "sort_ChicagoYearSuffix1", // "sort_ChicagoYearSuffix2", - // "sort_Citation", + "sort_Citation", // "sort_CitationEdit", - // "sort_CitationNumberPrimaryAscendingViaMacroBibliography", + "sort_CitationNumberPrimaryAscendingViaMacroBibliography", // "sort_CitationNumberPrimaryAscendingViaMacroCitation", - // "sort_CitationNumberPrimaryAscendingViaVariableBibliography", + "sort_CitationNumberPrimaryAscendingViaVariableBibliography", // "sort_CitationNumberPrimaryAscendingViaVariableCitation", // "sort_CitationNumberPrimaryDescendingViaMacroBibliography", // "sort_CitationNumberPrimaryDescendingViaMacroCitation", // "sort_CitationNumberPrimaryDescendingViaVariableBibliography", // "sort_CitationNumberPrimaryDescendingViaVariableCitation", - // "sort_CitationNumberSecondaryAscendingViaMacroBibliography", - // "sort_CitationNumberSecondaryAscendingViaMacroCitation", - // "sort_CitationNumberSecondaryAscendingViaVariableBibliography", + "sort_CitationNumberSecondaryAscendingViaMacroBibliography", + "sort_CitationNumberSecondaryAscendingViaMacroCitation", + "sort_CitationNumberSecondaryAscendingViaVariableBibliography", // "sort_CitationNumberSecondaryAscendingViaVariableCitation", - // "sort_CitationSecondaryKey", + "sort_CitationSecondaryKey", // "sort_CitationUnsorted", // "sort_CiteGroupDelimiter", // "sort_ConditionalMacroDates", // "sort_DaleDalebout", - // "sort_DateMacroSortWithSecondFieldAlign", + "sort_DateMacroSortWithSecondFieldAlign", // "sort_DateVariable", // "sort_DateVariableMixedElementsAscendingA", - // "sort_DateVariableMixedElementsAscendingB", - // "sort_DateVariableMixedElementsDescendingA", + "sort_DateVariableMixedElementsAscendingB", + "sort_DateVariableMixedElementsDescendingA", // "sort_DateVariableMixedElementsDescendingB", // "sort_DateVariableRange", // "sort_DateVariableRangeMixed", @@ -1441,10 +1470,10 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "sort_EtAlUseLast", // "sort_FamilyOnly", // "sort_GroupedByAuthorstring", - // "sort_LatinUnicode", + "sort_LatinUnicode", // "sort_LeadingA", // "sort_LeadingApostropheOnNameParticle", - // "sort_LocalizedDateLimitedParts", + "sort_LocalizedDateLimitedParts", // "sort_NameImplicitSortOrderAndForm", // "sort_NameParticleInNameSortFalse", // "sort_NameParticleInNameSortTrue", @@ -1452,21 +1481,21 @@ private String applyCiteprocJs(String mode, String style, ItemDataProvider itemD // "sort_NamesUseLast", // "sort_NumberOfAuthorsAsKey", // "sort_OmittedBibRefMixedNumericStyle", - // "sort_OmittedBibRefNonNumericStyle", + "sort_OmittedBibRefNonNumericStyle", // "sort_Quotes", // "sort_RangeUnaffected", // "sort_SeparateAuthorsAndOthers", - // "sort_StatusFieldAscending", - // "sort_StatusFieldDescending", + "sort_StatusFieldAscending", + "sort_StatusFieldDescending", // "sort_StripMarkup", // "sort_SubstituteTitle", // "sort_TestInheritance", - // "sort_VariousNameMacros1", - // "sort_VariousNameMacros2", - // "sort_VariousNameMacros3", + "sort_VariousNameMacros1", + "sort_VariousNameMacros2", + "sort_VariousNameMacros3", // "sort_WithAndInOneEntry", - // "sortseparator_SortSeparatorEmpty", - // "substitute_RepeatedNamesOk", + "sortseparator_SortSeparatorEmpty", + "substitute_RepeatedNamesOk", // "substitute_SharedMacro", // "substitute_SuppressOrdinaryVariable", // "testers_FirstAutoGeneratedZoteroPluginTest", diff --git a/citeproc-java/src/test/resources/test-suite-overrides/bugreports_AccidentalAllCaps.yaml b/citeproc-java/src/test/resources/test-suite-overrides/bugreports_AccidentalAllCaps.yaml new file mode 100644 index 00000000..54ae51ba --- /dev/null +++ b/citeproc-java/src/test/resources/test-suite-overrides/bugreports_AccidentalAllCaps.yaml @@ -0,0 +1,3 @@ +result: + html: |- + J. Doe, His Anonymous Life, 1965.