File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
metafix/src/test/java/org/metafacture/metafix Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2017,6 +2017,29 @@ public void shouldReplaceAllRegexesInArraySubField() {
2017
2017
);
2018
2018
}
2019
2019
2020
+ @ Test
2021
+ // See https://github.com/metafacture/metafacture-fix/issues/255
2022
+ public void shouldFailToReplaceAllInRepeatedSubfieldOfObjectWithAsterisk () {
2023
+ MetafixTestHelpers .assertProcessException (IllegalArgumentException .class , "Can't find: 2 in: null" , () ->
2024
+ MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
2025
+ "replace_all('predecessor[].*.label', 'Vorg. ---> ', '')"
2026
+ ),
2027
+ i -> {
2028
+ i .startRecord ("1" );
2029
+ i .startEntity ("predecessor[]" );
2030
+ i .startEntity ("1" );
2031
+ i .literal ("label" , "Früher u.d.T." );
2032
+ i .literal ("label" , "Gewaltprävention in Schule und Jugendhilfe" );
2033
+ i .endEntity ();
2034
+ i .endEntity ();
2035
+ i .endRecord ();
2036
+ },
2037
+ o -> {
2038
+ }
2039
+ )
2040
+ );
2041
+ }
2042
+
2020
2043
@ Test
2021
2044
public void shouldNotInsertOptionalArraySubFieldWithAsteriskInReplaceAll () {
2022
2045
MetafixTestHelpers .assertFix (streamReceiver , Arrays .asList (
You can’t perform that action at this time.
0 commit comments