File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
src/test/java/pl/project13/maven/git Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change 1717
1818package pl .project13 .maven .git ;
1919
20- import org .apache .maven .plugin .MojoExecutionException ;
2120import org .junit .Test ;
2221import pl .project13 .core .PropertiesFileGenerator ;
2322
2423import java .io .File ;
2524import java .io .IOException ;
2625
27- import java .util .regex .Pattern ;
28-
2926import static org .assertj .core .api .Assertions .assertThat ;
30- import static org .junit .Assert .assertFalse ;
31- import static org .junit .Assert .assertTrue ;
3227
3328public class GitCommitIdMojoTest {
3429 @ Test
@@ -54,19 +49,4 @@ public void testCraftPropertiesOutputFileWithFullPath() throws IOException {
5449 assertThat (result .getCanonicalPath ()).isEqualTo (
5550 new File (targetDir ).toPath ().resolve (generateGitPropertiesFilePath ).toFile ().getCanonicalPath ());
5651 }
57-
58- @ Test
59- public void verifyAllowedCharactersForEvaluateOnCommit () throws MojoExecutionException {
60- Pattern p = GitCommitIdMojo .allowedCharactersForEvaluateOnCommit ;
61- assertTrue (p .matcher ("5957e419d" ).matches ());
62- assertTrue (p .matcher ("my_tag" ).matches ());
63- assertTrue (p .matcher ("my-tag" ).matches ());
64- assertTrue (p .matcher ("my.tag" ).matches ());
65- assertTrue (p .matcher ("HEAD^1" ).matches ());
66- assertTrue (p .matcher ("feature/branch" ).matches ());
67-
68- assertFalse (p .matcher ("; CODE INJECTION" ).matches ());
69- assertFalse (p .matcher ("|exit" ).matches ());
70- assertFalse (p .matcher ("&&cat /etc/passwd" ).matches ());
71- }
7252}
You can’t perform that action at this time.
0 commit comments