Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/emibcn/badge-actio…
Browse files Browse the repository at this point in the history
…n-2.0.2
  • Loading branch information
remkop authored Feb 5, 2023
2 parents 0bc732c + a868658 commit 9013411
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ target/
tmp/
picocli.iml
/out/
/picocli-annotation-processing-tests/out/
/picocli-codegen/out/
/picocli-examples/out/
/picocli-groovy/out/
/picocli-shell-jline2/out/
/picocli-shell-jline3/out/
/picocli-spring-boot-starter/out/
/picocli-*/out/
/src/test/dejagnu.tests/xtrace.log
/src/test/dejagnu.tests/log/completion.sum
/src/test/dejagnu.tests/log/completion.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@


import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -507,6 +509,7 @@ private String expectedCompletionScriptForNonDefault() {
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppHelp() throws Exception {
String[][] argsList = new String[][] {
{"-h"},
Expand Down Expand Up @@ -544,6 +547,7 @@ public void testAutoCompleteAppHelp_NoSystemExit() throws Exception {
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteRequiresCommandLineFQCN() throws Exception {
int statusCode = catchSystemExit(() -> {
restoreSystemProperties(() -> {
Expand All @@ -568,6 +572,7 @@ public void testAutoCompleteRequiresCommandLineFQCN_NoSystemExit() throws Except
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppCannotInstantiate() throws Exception {
@CommandLine.Command(name = "test")
class TestApp {
Expand Down Expand Up @@ -602,6 +607,7 @@ class TestApp {
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppCompletionScriptFileWillNotOverwrite() throws Exception {
File dir = new File(System.getProperty("java.io.tmpdir"));
final File completionScript = new File(dir, "App_completion");
Expand Down Expand Up @@ -650,6 +656,7 @@ public void testAutoCompleteAppCompletionScriptFileWillNotOverwrite_NoSystemExit
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppCommandScriptFileWillNotOverwrite() throws Exception {
File dir = new File(System.getProperty("java.io.tmpdir"));
final File commandScript = new File(dir, "picocli.AutoComplete");
Expand Down Expand Up @@ -702,6 +709,7 @@ public void testAutoCompleteAppCommandScriptFileWillNotOverwrite_NoSystemExit()
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppCommandScriptFileWillOverwriteIfRequested() throws Exception {
File dir = new File(System.getProperty("java.io.tmpdir"));
final File commandScript = new File(dir, "picocli.AutoComplete");
Expand Down Expand Up @@ -731,6 +739,7 @@ public void testAutoCompleteAppCommandScriptFileWillOverwriteIfRequested() throw
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppBothScriptFilesForceOverwrite() throws Exception {
File dir = new File(System.getProperty("java.io.tmpdir"));
final File commandScript = new File(dir, "picocli.AutoComplete");
Expand Down Expand Up @@ -816,6 +825,7 @@ public void testAutoCompleteAppBothScriptFilesForceOverwrite_NoSystemExit() thro
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppGeneratesScriptNameBasedOnCommandName() throws Exception {

final String commandName = "bestCommandEver";
Expand Down Expand Up @@ -871,6 +881,7 @@ public <K> K create(Class<K> cls) {
}

@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void testAutoCompleteAppUsesCustomFactory() throws Exception {

final String commandName = "nondefault";
Expand Down Expand Up @@ -902,6 +913,7 @@ public void testAutoCompleteAppUsesCustomFactory() throws Exception {
private static class PrivateCommandClass { }
//Support generating autocompletion scripts for non-public @Command classes #306
@Test
@DisabledForJreRange(min = JRE.JAVA_18, max = JRE.JAVA_21, disabledReason = "UnsupportedOperationException in SystemLambda.withSecurityManager")
public void test306_SupportGeneratingAutocompletionScriptForNonPublicCommandClasses() throws Exception {
File dir = new File(System.getProperty("java.io.tmpdir"));
final File completionScript = new File(dir, "App_completion");
Expand Down

0 comments on commit 9013411

Please sign in to comment.