Skip to content

Commit 82cd4cd

Browse files
authored
Fix double underscore handling during normalization
1 parent 837b43b commit 82cd4cd

File tree

1 file changed

+7
-1
lines changed
  • cloudinary-core/src/test/java/com/cloudinary/transformation

1 file changed

+7
-1
lines changed

cloudinary-core/src/test/java/com/cloudinary/transformation/LayerTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ public void testUnderlay() {
5858
assertEquals(DEFAULT_UPLOAD_PATH + "h_100,u_text:hello,w_100/test", result);
5959
}
6060

61+
@Test
62+
public void testPublicIdWithDoubleUnderscoresInOverlay() {
63+
Transformation transformation = new Transformation().width(300).height(200).crop("fill").overlay("my__lake");
64+
String result = cloudinary.url().transformation(transformation).generate("sample.jpg");
65+
assertEquals(DEFAULT_UPLOAD_PATH + "c_fill,h_200,l_my__lake,w_300/sample.jpg", result);
66+
}
6167

6268
@Test
6369
public void testLayerOptions() {
@@ -133,4 +139,4 @@ public void testToString() throws Exception {
133139
public void testFormattedPublicId() throws Exception {
134140

135141
}
136-
}
142+
}

0 commit comments

Comments
 (0)