8271224: runtime/EnclosingMethodAttr/EnclMethodAttr.java doesn't check exit code

Reviewed-by: mseledtsov, dholmes
This commit is contained in:
Igor Ignatyev 2021-08-04 02:22:07 +00:00
parent 34ba70a71b
commit 68dd828088

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,7 @@ public class EnclMethodAttr {
System.out.println("Regression test for bug 8044738");
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("EnclMethTest");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldNotHaveExitValue(0);
output.shouldContain("java.lang.ClassFormatError: Wrong EnclosingMethod");
}
}