Skip to content

Commit

Permalink
Update metafacture-fix issue references after transfer. (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Jan 29, 2025
1 parent a6b3d14 commit 9ed5d4e
Show file tree
Hide file tree
Showing 40 changed files with 92 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ public void escape_shouldEscapeAllNonAsciiChars() {
assertEquals("København", result);
}

/**
* Test for <a href="https://github.com/culturegraph/metafacture-core/issues/267">#267</a>.
*/
@Test
public void escape_shouldEscapeSurrogatePairsAsSingleEntity() {
public void issue267_escape_shouldEscapeSurrogatePairsAsSingleEntity() {
final String unescaped = "Smile: \ud83d\ude09";
final String result = XmlUtil.escape(unescaped);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ protected boolean shouldQuoteText(final char[] buffer, final int len) {
};
}

/*
* Test for issue https://github.com/culturegraph/metafacture-core/issues/161
*/
@Test
public void issue161() {
final String longValue = StringUtil.repeatChars('a', AbstractFormatter.BUFFER_SIZE * 2 + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,19 @@ public void shouldIterateOverList() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldIterateOverListWithCharacterClass() {
shouldIterateOverList("n[ao]me", 3);
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldIterateOverListWithAlternation() {
shouldIterateOverList("name|nome", 3);
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldIterateOverListWithWildcard() {
shouldIterateOverList("n?me", 3);
}
Expand Down Expand Up @@ -749,26 +749,26 @@ public void shouldIterateOverListOfHashes() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldIterateOverListOfHashesWithCharacterClass() {
shouldIterateOverListOfHashes("n[ao]me.value", 3);
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/143")
// See issue metafacture-fix#119
@MetafixToDo("See issue #603")
public void shouldIterateOverListOfHashesWithAlternation() {
shouldIterateOverListOfHashes("name.value|nome.value", 3);
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldIterateOverListOfHashesWithWildcard() {
shouldIterateOverListOfHashes("n?me.value", 3);
}

@Test // checkstyle-disable-line JavaNCSS
// See https://github.com/metafacture/metafacture-fix/issues/119
// See issue metafacture-fix#119
public void shouldPerformComplexOperationWithPathWildcard() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"set_array('coll[]')",
Expand Down
18 changes: 9 additions & 9 deletions metafix/src/test/java/org/metafacture/metafix/MetafixIfTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -634,19 +634,19 @@ public void shouldEqualAny() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyCharacterClass() {
shouldEqualAny("n[ao]me");
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyAlternation() {
shouldEqualAny("name|nome");
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyWildcard() {
shouldEqualAny("n?me");
}
Expand Down Expand Up @@ -685,7 +685,7 @@ public void shouldEqualAnyNested() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyNestedCharacterClass() {
shouldEqualAnyNested("data.n[ao]me");
}
Expand All @@ -696,7 +696,7 @@ public void shouldEqualAnyNestedAlternation() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyNestedWildcard() {
shouldEqualAnyNested("data.n?me");
}
Expand Down Expand Up @@ -737,7 +737,7 @@ public void shouldEqualAnyListBind() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyListBindCharacterClass() {
shouldEqualAnyListBind("$i.n[ao]me");
}
Expand All @@ -748,7 +748,7 @@ public void shouldEqualAnyListBindAlternation() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/115
// See issue metafacture-fix#115
public void shouldEqualAnyListBindWildcard() {
shouldEqualAnyListBind("$i.n?me");
}
Expand Down Expand Up @@ -802,7 +802,7 @@ public void shouldContainImmediateField() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/117
// See issue metafacture-fix#117
public void shouldContainNestedField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"if exists('data.name')",
Expand Down Expand Up @@ -861,7 +861,7 @@ public void shouldContainNestedField() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/117
// See issue metafacture-fix#117
public void shouldContainNestedArrayField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"if exists('data[].*.name')",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public void shouldLookupMovedExternalArrayWithAsteriskExplicitAppend() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/121
// See issue #601
public void shouldLookupArraySubFieldWithAsterisk() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"lookup('animals[].*.Aanimal', '" + TSV_MAP + "', 'sep_char': '\t')"
Expand Down Expand Up @@ -594,7 +594,7 @@ public void shouldDeleteLookupInExternalFileMapWithWrongOptions() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/149
// See issue metafacture-fix#149
public void shouldKeepOriginalValueIfNotFoundAndNoDefault() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"lookup('title.*', Aloha: 'Alohaeha', 'Moin': 'Moin zäme')"
Expand Down Expand Up @@ -685,7 +685,7 @@ public void shouldPreferDefaultOptionValueOverDefaultMapValue() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/149
// See issue metafacture-fix#149
public void shouldDeleteNonFoundLookupOnDemand() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"lookup('title.*', Aloha: Alohaeha, 'Moin': 'Moin zäme', delete: 'true')"
Expand All @@ -707,7 +707,7 @@ public void shouldDeleteNonFoundLookupOnDemand() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/149
// See issue metafacture-fix#149
public void shouldNotDeleteNonFoundLookupExplicitly() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"lookup('title.*', Aloha: Alohaeha, 'Moin': 'Moin zäme', delete: 'false')"
Expand Down Expand Up @@ -773,7 +773,7 @@ public void shouldLookupAfterDeletingUnsuccessfulLookup() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/149
// See issue metafacture-fix#149
public void shouldDeleteNonFoundLookupOnDemandNonRepeatedField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"lookup('title', Aloha: Alohaeha, 'Moin': 'Moin zäme', delete: 'true')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ public void wildcardNestedPartialMulti() {
}

@Test
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/121")
@MetafixToDo("See issue #601")
public void wildcardFullFieldNonIndex() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"trim('*')"),
Expand Down Expand Up @@ -751,7 +751,7 @@ public void wildcardFullFieldNonIndex() {
}

@Test
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/121")
@MetafixToDo("See issue #601")
public void wildcardNestedFullFieldNonIndex() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"trim('work.*')"),
Expand Down Expand Up @@ -902,7 +902,7 @@ public void shouldAppendValueInArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldAppendValueInEntireArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"append('animals[].*', ' is cool')"
Expand Down Expand Up @@ -950,7 +950,7 @@ public void shouldNotAppendValueToArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldNotAppendValueToHash() {
MetafixTestHelpers.assertExecutionException(IllegalStateException.class, "Expected String, got Hash", () ->
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
Expand All @@ -972,7 +972,7 @@ public void shouldNotAppendValueToHash() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/123
// See issue metafacture-fix#123
public void shouldIncludeLocationAndTextInExecutionException() {
final String text = "append('animals', ' is cool')";
final String message = "Error while executing Fix expression (at FILE, line 2): " + text;
Expand Down Expand Up @@ -1270,7 +1270,7 @@ public void shouldConvertInvalidObjectFromJsonWithErrorString() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldFilterArrayObjectValues() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"filter('animals[]', '[Cc]at')"
Expand Down Expand Up @@ -1611,7 +1611,7 @@ public void shouldJoinSingleField() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldJoinArrayObjectField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"join_field('animals[]', ',')"
Expand Down Expand Up @@ -1704,7 +1704,7 @@ public void shouldPrependValueInArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldPrependValueInEntireArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"prepend('animals[].*', 'cool ')"
Expand All @@ -1731,7 +1731,7 @@ public void shouldPrependValueInEntireArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/121
// See issue #601
public void shouldPrependValueInNestedArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"prepend('nestedTest[].*.test[].*', 'Number ')"
Expand Down Expand Up @@ -1777,7 +1777,7 @@ public void shouldPrependValueInNestedArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/121
// See issue #601
public void shouldPrependValueInArraySubField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"prepend('coll[].*.a', 'HELLO ')"
Expand Down Expand Up @@ -1825,7 +1825,7 @@ public void shouldPrependValueInArraySubField() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldNotPrependValueToArray() {
MetafixTestHelpers.assertExecutionException(IllegalStateException.class, "Expected String, got Array", () ->
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
Expand Down Expand Up @@ -1963,7 +1963,7 @@ public void shouldReplaceAllRegexesWithGroupName() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/100
// See issue metafacture-fix#100
public void shouldReplaceAllRegexesInArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"replace_all('animals[].*', a, QR)"
Expand All @@ -1990,7 +1990,7 @@ public void shouldReplaceAllRegexesInArray() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/121
// See issue #601
public void shouldReplaceAllRegexesInArraySubField() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"replace_all('coll[].*.a', 'o', '__')"
Expand Down Expand Up @@ -2038,7 +2038,7 @@ public void shouldReplaceAllRegexesInArraySubField() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/255
// See issue metafacture-fix#255
public void shouldFailToReplaceAllInRepeatedSubfieldOfObjectWithAsterisk() {
MetafixTestHelpers.assertProcessException(IllegalArgumentException.class, "Can't find: 2 in: null", () ->
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
Expand Down Expand Up @@ -2707,7 +2707,7 @@ public void shouldMoveFieldToPathWithTwoReservedFields() {
}

@Test
// See https://github.com/metafacture/metafacture-fix/issues/121
// See issue #601
public void shouldReplaceAllRegexesInNestedArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"replace_all('nestedTest[].*.test[].*', 'o', '__')"
Expand Down Expand Up @@ -3172,7 +3172,7 @@ public void shouldReverseArray() {
}

@Test
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/121")
@MetafixToDo("See issue #601")
public void shouldReverseArrayOfStringsWithAsterisk() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"reverse('test[].*')"
Expand All @@ -3199,7 +3199,7 @@ public void shouldReverseArrayOfStringsWithAsterisk() {
}

@Test
@MetafixToDo("java.lang.ArrayIndexOutOfBoundsException: 0; see https://github.com/metafacture/metafacture-fix/issues/121")
@MetafixToDo("java.lang.ArrayIndexOutOfBoundsException: 0; see issue #601")
public void shouldReverseArrayOfHashesWithAsterisk() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"reverse('ANIMALS[].*')"
Expand Down
Loading

0 comments on commit 9ed5d4e

Please sign in to comment.