19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.Graphics;
25 import java.awt.Graphics2D;
26 import java.awt.Robot;
27 import java.awt.image.BufferedImage;
28 import java.io.File;
29
30 import javax.imageio.ImageIO;
31 import javax.swing.JFrame;
32 import javax.swing.JLabel;
33 import javax.swing.SwingUtilities;
34
35 import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
36
37 /**
38 * @test
39 * @bug 8015085
40 * @summary Shortening via " ... " is broken for Strings containing a combining
41 * diaeresis.
42 * @author Sergey Bylokhov
43 */
44 public class TestBadBreak {
45
46 static JFrame frame;
47 static Robot robot;
48 static final String withCombiningDiaeresis = "123p://.aaaaaaaaaaaaaaaaaaaaaa.123/a\u0308" ;
49 static final String withoutCombiningDiaeresis = "123p://.aaaaaaaaaaaaaaaaaaaaaa.123/\u00E4" ;
50
51 public static void main(final String[] args) throws Exception {
52 robot = new Robot();
53 final BufferedImage bi1 = new BufferedImage(200, 90, TYPE_INT_ARGB);
54 final BufferedImage bi2 = new BufferedImage(200, 90, TYPE_INT_ARGB);
55 test(withCombiningDiaeresis, bi1);
56 test(withoutCombiningDiaeresis, bi2);
57 for (int x = 0; x < bi1.getWidth(); ++x) {
58 for (int y = 0; y < bi1.getHeight(); ++y) {
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.Graphics;
25 import java.awt.Graphics2D;
26 import java.awt.Robot;
27 import java.awt.image.BufferedImage;
28 import java.io.File;
29
30 import javax.imageio.ImageIO;
31 import javax.swing.JFrame;
32 import javax.swing.JLabel;
33 import javax.swing.SwingUtilities;
34
35 import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
36
37 /**
38 * @test
39 * @key headful
40 * @bug 8015085
41 * @summary Shortening via " ... " is broken for Strings containing a combining
42 * diaeresis.
43 * @author Sergey Bylokhov
44 */
45 public class TestBadBreak {
46
47 static JFrame frame;
48 static Robot robot;
49 static final String withCombiningDiaeresis = "123p://.aaaaaaaaaaaaaaaaaaaaaa.123/a\u0308" ;
50 static final String withoutCombiningDiaeresis = "123p://.aaaaaaaaaaaaaaaaaaaaaa.123/\u00E4" ;
51
52 public static void main(final String[] args) throws Exception {
53 robot = new Robot();
54 final BufferedImage bi1 = new BufferedImage(200, 90, TYPE_INT_ARGB);
55 final BufferedImage bi2 = new BufferedImage(200, 90, TYPE_INT_ARGB);
56 test(withCombiningDiaeresis, bi1);
57 test(withoutCombiningDiaeresis, bi2);
58 for (int x = 0; x < bi1.getWidth(); ++x) {
59 for (int y = 0; y < bi1.getHeight(); ++y) {
|