package org.jetbrains.idea.svn;

import com.intellij.openapi.vcs.VcsConfiguration;
import com.intellij.openapi.vfs.VirtualFile;
import org.junit.Ignore;
import org.junit.Test;

/**
 * @author yole
 */
public class SvnRenameTest extends SvnTestCase {
  @Test
  public void testSimpleRename() throws Exception {
    enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
    final VirtualFile a = createFileInCommand("a.txt", "test");
    checkin();

    renameFileInCommand(a, "b.txt");
    verify(runSvn("status"), "A + b.txt", "D a.txt");
  }

  // IDEADEV-18844
  @Test
  @Ignore
  public void testRenameReplace() throws Exception {
    enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
    final VirtualFile a = createFileInCommand("a.txt", "old");
    final VirtualFile aNew = createFileInCommand("aNew.txt", "new");
    checkin();

    renameFileInCommand(a, "aOld.txt");
    renameFileInCommand(aNew, "a.txt");
    verify(runSvn("status"), "R + a.txt", "D aNew.txt", "A + aOld.txt");
  }
}
@@ -1013,10 +1013,437 @@
 t%22);%0A  %7D
+%0A%0A  // IDEADEV-16251%0A  @Test%0A  @Ignore%0A  public void testRenameAddedPackage() throws Exception %7B%0A    enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);%0A    final VirtualFile dir = createDirInCommand(myWorkingCopyDir, %22child%22);%0A    final VirtualFile file = createFileInCommand(dir, %22a.txt%22, %22content%22);%0A    renameFileInCommand(dir, %22newchild%22);%0A    verify(runSvn(%22status%22), %22A newchild%22, %22A newchild%5C%5Ca.txt%22);%0A  %7D
 %0A%7D

test for IDEADEV-16251