mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Now we have Code Vision hints which determine the author via Git history and show it in the editor automatically, and this information is more accurate than the tags which were automatically added when files were created. GitOrigin-RevId: 3b9fc7ce3e9676cb958a649f69f741732e24f4e9
38 lines
1.2 KiB
Java
38 lines
1.2 KiB
Java
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
|
package org.jetbrains.idea.svn;
|
|
|
|
import com.intellij.openapi.util.Version;
|
|
import com.intellij.openapi.vcs.VcsException;
|
|
import org.jetbrains.idea.svn.api.CmdVersionClient;
|
|
import org.junit.Test;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
public class ParseVersionTest {
|
|
|
|
@Test
|
|
public void testSvnOutput() throws Exception {
|
|
assertEquals(new Version(1, 8, 0), CmdVersionClient.parseVersion("1.8.0"));
|
|
}
|
|
|
|
@Test
|
|
public void testSlikSvnOutput() throws Exception {
|
|
assertEquals(new Version(1, 7, 8), CmdVersionClient.parseVersion("1.7.8-SlikSvn-1.7.8-WIN32"));
|
|
}
|
|
|
|
@Test(expected = VcsException.class)
|
|
public void testInvalidOutput() throws Exception {
|
|
CmdVersionClient.parseVersion("10.2");
|
|
}
|
|
|
|
@Test
|
|
public void testMultilineFirstLineCorrect() throws Exception {
|
|
assertEquals(new Version(10, 2, 15), CmdVersionClient.parseVersion("10.2.15fdsjkf\n8.10.3"));
|
|
}
|
|
|
|
@Test(expected = VcsException.class)
|
|
public void testMultilineSecondLineCorrect() throws Exception {
|
|
assertEquals(new Version(8, 10, 3), CmdVersionClient.parseVersion("10.2.fdsjkf\n8.10.3"));
|
|
}
|
|
}
|