mirror of
https://github.com/jlengrand/picocli.git
synced 2026-03-10 08:41:17 +00:00
[#1258] simplify closure test
This commit is contained in:
@@ -580,19 +580,13 @@ import picocli.CommandLine.Model.CommandSpec
|
||||
import picocli.CommandLine
|
||||
import static picocli.CommandLine.*
|
||||
|
||||
@Command(name="testCompletionCandidates")
|
||||
@Command(name="testCompletionCandidatesWithClosure")
|
||||
@picocli.groovy.PicocliScript2
|
||||
import groovy.transform.Field
|
||||
|
||||
@picocli.CommandLine.Spec
|
||||
@Field CommandSpec spec;
|
||||
|
||||
class MyAbcCandidates extends ArrayList<String> {
|
||||
MyAbcCandidates() { super(Arrays.asList("A", "B", "C")); }
|
||||
}
|
||||
|
||||
Class<MyAbcCandidates> cls = MyAbcCandidates
|
||||
|
||||
@Option(names = '-s', completionCandidates = {["A", "B", "C"]})
|
||||
@Field String s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user