equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
36 public static void main(String[] args) throws Exception { |
36 public static void main(String[] args) throws Exception { |
37 |
37 |
38 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
38 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
39 "-Xlog:exceptions=info", "NoClassFound"); |
39 "-Xlog:exceptions=info", "NoClassFound"); |
40 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
40 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
41 output.shouldContain("<a 'java/lang/ClassNotFoundException': NoClassFound>"); |
41 output.shouldContain("<a 'java/lang/ClassNotFoundException'").shouldContain(": NoClassFound>"); |
42 output.shouldNotContain("<a 'java/lang/ClassNotFoundException'>"); |
42 output.shouldNotContain("<a 'java/lang/ClassNotFoundException'>"); |
43 output.shouldHaveExitValue(1); |
43 output.shouldHaveExitValue(1); |
44 } |
44 } |
45 } |
45 } |