mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix maven test
This commit is contained in:
+32
-23
@@ -1,5 +1,6 @@
|
||||
package org.jetbrains.idea.maven.plugins.jgitBuildnumber;
|
||||
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.idea.maven.dom.MavenDomTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -8,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author Sergey Evdokimov
|
||||
*/
|
||||
public class JGitBuildNumberTest extends MavenDomTestCase {
|
||||
public class MavenJGitBuildNumberTest extends MavenDomTestCase {
|
||||
|
||||
public void testCompletion() throws Exception {
|
||||
importProject("<groupId>test</groupId>\n" +
|
||||
@@ -49,13 +50,26 @@ public class JGitBuildNumberTest extends MavenDomTestCase {
|
||||
}
|
||||
|
||||
public void testHighlighting() throws Exception {
|
||||
createModulePom("m", "<artifactId>m</artifactId>\n" +
|
||||
"<version>1</version>\n" +
|
||||
"<parent>\n" +
|
||||
" <groupId>test</groupId>\n" +
|
||||
" <artifactId>project</artifactId>\n" +
|
||||
" <version>1</version>\n" +
|
||||
"</parent>\n" +
|
||||
"<properties>\n" +
|
||||
" <aaa>${git.commitsCount}</aaa>\n" +
|
||||
" <bbb>${git.commitsCount__}</bbb>\n" +
|
||||
"</properties>\n");
|
||||
|
||||
importProject("<groupId>test</groupId>\n" +
|
||||
"<artifactId>project</artifactId>\n" +
|
||||
"<version>1</version>\n" +
|
||||
"<properties>\n" +
|
||||
" <aaa>${git.commitsCount}</aaa>" +
|
||||
" <bbb>${git.commitsCount__}</bbb>" +
|
||||
"</properties>\n" +
|
||||
"<packaging>pom</packaging>\n" +
|
||||
"<modules>\n" +
|
||||
" <module>m</module>\n" +
|
||||
"</modules>\n" +
|
||||
|
||||
" <build>\n" +
|
||||
" <plugins>\n" +
|
||||
" <plugin>\n" +
|
||||
@@ -64,26 +78,21 @@ public class JGitBuildNumberTest extends MavenDomTestCase {
|
||||
" </plugin>\n" +
|
||||
" </plugins>\n" +
|
||||
" </build>\n"
|
||||
);
|
||||
|
||||
createProjectPom("<groupId>test</groupId>\n" +
|
||||
"<artifactId>project</artifactId>\n" +
|
||||
"<version>1</version>\n" +
|
||||
"<properties>\n" +
|
||||
" <aaa>${git.commitsCount}</aaa>" +
|
||||
" <bbb>${<error>git.commitsCount__</error>}</bbb>" +
|
||||
"</properties>\n" +
|
||||
" <build>\n" +
|
||||
" <plugins>\n" +
|
||||
" <plugin>\n" +
|
||||
" <groupId>ru.concerteza.buildnumber</groupId>\n" +
|
||||
" <artifactId>maven-jgit-buildnumber-plugin</artifactId>\n" +
|
||||
" </plugin>\n" +
|
||||
" </plugins>\n" +
|
||||
" </build>\n"
|
||||
);
|
||||
|
||||
checkHighlighting(myProjectPom);
|
||||
VirtualFile pom = createModulePom("m", "<artifactId>m</artifactId>\n" +
|
||||
"<version>1</version>\n" +
|
||||
"<parent>\n" +
|
||||
" <groupId>test</groupId>\n" +
|
||||
" <artifactId>project</artifactId>\n" +
|
||||
" <version>1</version>\n" +
|
||||
"</parent>\n" +
|
||||
"<properties>\n" +
|
||||
" <aaa>${git.commitsCount}</aaa>\n" +
|
||||
" <bbb>${<error>git.commitsCount__</error>}</bbb>\n" +
|
||||
"</properties>\n");
|
||||
|
||||
checkHighlighting(pom, true, false, true);
|
||||
}
|
||||
|
||||
public void testNoPluginHighlighting() throws Exception {
|
||||
Reference in New Issue
Block a user