@@ -0,0 +1,2503 @@
+/**%0A * Copyright (C) 2016 Matthieu Brouillard %5Bhttp://oss.brouillard.fr/jgitver%5D (matthieu@brouillard.fr)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage fr.brouillard.oss.jgitver.issues;%0A%0Aimport java.util.Arrays;%0A%0Aimport org.hamcrest.CoreMatchers;%0Aimport org.junit.After;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport fr.brouillard.oss.jgitver.BranchingPolicy;%0Aimport fr.brouillard.oss.jgitver.GitVersionCalculator;%0Aimport fr.brouillard.oss.jgitver.Misc;%0Aimport fr.brouillard.oss.jgitver.Scenarios.Scenario;%0Aimport fr.brouillard.oss.jgitver.Scenarios.ScenarioBuilder;%0A%0Apublic class Issue23Test %7B%0A    private static final String BRANCH_NAME = %22my-branch%22;%0A    private static final String BASE_TAG = %221.0.0%22;%0A    private Scenario s;%0A%0A    @Before%0A    public void init_scenario() %7B%0A        s = new ScenarioBuilder()%0A                .commit(%22content%22, %22A%22)%0A                .tag(BASE_TAG)%0A                .branchOnAppId(BRANCH_NAME, %22A%22)%0A                .commit(%22content%22, %22B%22)%0A                .getScenario();%0A%0A        if (Misc.isDebugMode()) %7B%0A            System.out.println(%22git repository created under: %22 + s.getRepositoryLocation());%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void check_version_using_IDENTITY_branch_transformation() %7B%0A        GitVersionCalculator gvc = GitVersionCalculator.location(s.getRepositoryLocation());%0A        gvc.setMavenLike(false);%0A        gvc.setAutoIncrementPatch(false);%0A        gvc.setUseDistance(false);%0A        gvc.setUseDirty(false);%0A        gvc.setUseGitCommitId(false);%0A        gvc.setGitCommitIdLength(20);%0A        gvc.setNonQualifierBranches(%22%22);%0A        gvc.setUseDefaultBranchingPolicy(false);%0A        gvc.setQualifierBranchingPolicies(new BranchingPolicy(%22(.*)%22, Arrays.asList(%22IDENTITY%22)));%0A%0A        Assert.assertThat(gvc.getVersion(), CoreMatchers.is(BASE_TAG + %22-%22 + BRANCH_NAME));%0A    %7D%0A%0A    @After%0A    public void cleanup() %7B%0A        Misc.deleteDirectorySimple(s.getRepositoryLocation());%0A    %7D%0A%7D%0A

add a test to try to reproduce issue #23