File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
opengrok-indexer/src/test/java/org/opengrok/indexer/index Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -358,15 +358,20 @@ private void changeGitRepository(File repositoryRoot) throws Exception {
358
358
assertTrue (rmFile .exists ());
359
359
git .rm ().addFilepattern ("main.o" ).call ();
360
360
git .
commit ().
setMessage (
"delete" ).
setAuthor (
"foo" ,
"[email protected] " ).
setAll (
true ).
call ();
361
+ assertFalse (rmFile .exists ());
361
362
362
363
// Rename some file.
363
- File fooFile = new File (repositoryRoot , "Makefile" );
364
+ final String fooFileName = "Makefile" ;
365
+ final String barFileName = "Makefile.renamed" ;
366
+ File fooFile = new File (repositoryRoot , fooFileName );
364
367
assertTrue (fooFile .exists ());
365
- File barFile = new File (repositoryRoot , "Makefile.renamed" );
368
+ File barFile = new File (repositoryRoot , barFileName );
366
369
assertTrue (fooFile .renameTo (barFile ));
367
- git .add ().addFilepattern ("Makefile.renamed" ).call ();
368
- git .rm ().addFilepattern ("Makefile" ).call ();
370
+ git .add ().addFilepattern (barFileName ).call ();
371
+ git .rm ().addFilepattern (fooFileName ).call ();
369
372
git .
commit ().
setMessage (
"rename" ).
setAuthor (
"foo" ,
"[email protected] " ).
setAll (
true ).
call ();
373
+ assertTrue (barFile .exists ());
374
+ assertFalse (fooFile .exists ());
370
375
371
376
addMergeCommit (git , repositoryRoot );
372
377
}
You can’t perform that action at this time.
0 commit comments