mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 12:51:35 +02:00
Add test confirming the dangling meta char exception is not thrown anymore (fix #1025)
This commit is contained in:
@@ -41,6 +41,7 @@ public class GitProjectRepoTest {
|
||||
private File rootdir;
|
||||
FSGitRepoStore repoStore;
|
||||
GitProjectRepo repo;
|
||||
GitProjectRepo badGitignore;
|
||||
|
||||
@Before
|
||||
public void setup() throws IOException {
|
||||
@@ -50,6 +51,8 @@ public class GitProjectRepoTest {
|
||||
repoStore = new FSGitRepoStore(rootdir.getAbsolutePath());
|
||||
repo = new GitProjectRepo("repo");
|
||||
repo.useExistingRepository(repoStore);
|
||||
badGitignore = new GitProjectRepo("badgitignore");
|
||||
badGitignore.useExistingRepository(repoStore);
|
||||
}
|
||||
|
||||
private GitDirectoryContents makeDirContents(
|
||||
@@ -121,4 +124,21 @@ public class GitProjectRepoTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void badGitignoreShouldNotThrow() throws IOException {
|
||||
GitDirectoryContents contents = makeDirContents(
|
||||
".gitignore",
|
||||
"*.ignored\n",
|
||||
"file1.ignored",
|
||||
"",
|
||||
"file1.txt",
|
||||
"",
|
||||
"file2.txt",
|
||||
"",
|
||||
"added.ignored",
|
||||
""
|
||||
);
|
||||
badGitignore.commitAndGetMissing(contents);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user