]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9601-cvsimport-vendor-branch.sh
help: make sure local html page exists before calling external processes
[thirdparty/git.git] / t / t9601-cvsimport-vendor-branch.sh
CommitLineData
b2252904
MH
1#!/bin/sh
2
3# Description of the files in the repository:
4#
5# imported-once.txt:
6#
7# Imported once. 1.1 and 1.1.1.1 should be identical.
8#
9# imported-twice.txt:
10#
11# Imported twice. HEAD should reflect the contents of the
12# second import (i.e., have the same contents as 1.1.1.2).
13#
14# imported-modified.txt:
15#
16# Imported, then modified on HEAD. HEAD should reflect the
17# modification.
18#
19# imported-modified-imported.txt:
20#
21# Imported, then modified on HEAD, then imported again.
22#
23# added-imported.txt,v:
24#
25# Added with 'cvs add' to create 1.1, then imported with
26# completely different contents to create 1.1.1.1, therefore the
27# vendor branch was never the default branch.
28#
29# imported-anonymously.txt:
30#
31# Like imported-twice.txt, but with a vendor branch whose branch
32# tag has been removed.
33
34test_description='git cvsimport handling of vendor branches'
765577b5 35GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
334afbc7
JS
36export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
37
b2252904
MH
38. ./lib-cvs.sh
39
9b777a16 40setup_cvs_test_repository t9601
b2252904 41
c2c09e23 42test_expect_success PERL 'import a module with a vendor branch' '
b2252904
MH
43
44 git cvsimport -C module-git module
45
46'
47
765577b5 48test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co main'
b2252904 49
765577b5 50test_expect_success PERL 'check main out of git repository' 'test_git_co main'
b2252904 51
c2c09e23 52test_expect_success PERL 'check a file that was imported once' '
b2252904 53
765577b5 54 test_cmp_branch_file main imported-once.txt
b2252904
MH
55
56'
57
c2c09e23 58test_expect_failure PERL 'check a file that was imported twice' '
b2252904 59
765577b5 60 test_cmp_branch_file main imported-twice.txt
b2252904
MH
61
62'
63
c2c09e23 64test_expect_success PERL 'check a file that was imported then modified on HEAD' '
b2252904 65
765577b5 66 test_cmp_branch_file main imported-modified.txt
b2252904
MH
67
68'
69
c2c09e23 70test_expect_success PERL 'check a file that was imported, modified, then imported again' '
b2252904 71
765577b5 72 test_cmp_branch_file main imported-modified-imported.txt
b2252904
MH
73
74'
75
c2c09e23 76test_expect_success PERL 'check a file that was added to HEAD then imported' '
b2252904 77
765577b5 78 test_cmp_branch_file main added-imported.txt
b2252904
MH
79
80'
81
c2c09e23 82test_expect_success PERL 'a vendor branch whose tag has been removed' '
b2252904 83
765577b5 84 test_cmp_branch_file main imported-anonymously.txt
b2252904
MH
85
86'
87
88test_done