Skip to content

Commit e70bcab

Browse files
committed
Add a test which sets "ratchetFrom" at the global level, to reproduce #664.
1 parent 4bfcb5b commit e70bcab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugin-maven/src/test/java/com/diffplug/spotless/maven/GitRatchetMavenTest.java

+10
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ public void singleProjectExhaustive() throws Exception {
7171
}
7272
}
7373

74+
@Test
75+
public void singleProjectExhaustiveGlobal() throws Exception {
76+
try (Git git = initRepo()) {
77+
writePom(RATCHET_FROM_POM
78+
.replace("<ratchetFrom>baseline</ratchetFrom>", "")
79+
.replace("<formats>", "<ratchetFrom>baseline</ratchetFrom>\n<formats>"));
80+
checkBehavior(git);
81+
}
82+
}
83+
7484
private void checkBehavior(Git git) throws Exception {
7585
setFile(TEST_PATH).toContent("HELLO");
7686
git.add().addFilepattern(TEST_PATH).call();

0 commit comments

Comments
 (0)