1 package com.lexicalscope.jewel.issues; 2 3 import static org.hamcrest.MatcherAssert.assertThat; 4 import static org.hamcrest.Matchers.contains; 5 6 import java.util.List; 7 8 import org.junit.Test; 9 10 import com.lexicalscope.jewel.cli.CliFactory; 11 import com.lexicalscope.jewel.cli.Option; 12 13 public class GithubCipriancraciun { 14 public interface Options { 15 @Option 16 List<String> getKey(); 17 } 18 19 @Test public void repeatedMultiValuedActionsAreAddedToList() 20 { 21 final Options options = CliFactory.parseArguments(Options.class, "--key", "value1", "--key", "value2", "--key", "value3"); 22 assertThat(options.getKey(), contains("value1", "value2", "value3")); 23 } 24 }