Skip to content

Commit 1117166

Browse files
committed
Minimize and disable integration test for replace_all(). (#252)
1 parent e2bd22d commit 1117166

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
[]
1+
{
2+
"contribution" : [ {
3+
"agent" : {
4+
"label" : "COLEMAN, Julie",
5+
"label" : "KAY, Christian J."
6+
}
7+
} ]
8+
}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
set_array("contribution[]")
22

3-
do list(path:"700[01] ", "var":"$i")
4-
unless exists("$i.M")
5-
unless exists("$i.4")
6-
add_field("$i.4","ctb")
7-
end
8-
do list(path: "$i.4", "var":"$j")
9-
set_hash("contribution[].$append.agent")
10-
do list(path:"$i.0","var":"$k")
11-
if all_match("$k", "^\\(DE-588\\).*$")
12-
paste("contribution[].$last.agent.gndIdentifier","$k")
13-
paste("contribution[].$last.agent.id","$k")
14-
end
15-
end
16-
copy_field("$i.a","contribution[].$last.agent.label")
17-
set_array("contribution[].$last.agent.type[]","Person")
18-
copy_field("$j","contribution[].$last.role.id")
19-
end
20-
end
3+
do list(path: "700[01] ", "var": "$i")
4+
set_hash("contribution[].$append.agent")
5+
copy_field("$i.a", "contribution[].$last.agent.label")
216
end
227

23-
set_array("contribution[].*.type[]", "Contribution")
24-
replace_all("contribution[].*.agent.id","^\\(DE-588\\)(.*$)","https://d-nb.info/gnd/$1")
25-
replace_all("contribution[].*.agent.label","(?<!\\p{Upper})\\.$|[,]$","")
8+
replace_all("contribution[].*.agent.label", "(?<!\\p{Upper})\\.$|[,]$", "")
9+
retain("contribution[]")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See issue #251

0 commit comments

Comments
 (0)