t / t9601-cvsimport-vendor-branch.shon commit Merge branch 'tr/filter-branch' (aa43779)
   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'
  35. ./lib-cvs.sh
  36
  37CVSROOT="$TEST_DIRECTORY"/t9601/cvsroot
  38export CVSROOT
  39
  40test_expect_success 'import a module with a vendor branch' '
  41
  42        git cvsimport -C module-git module
  43
  44'
  45
  46test_expect_success 'check HEAD out of cvs repository' 'test_cvs_co master'
  47
  48test_expect_success 'check master out of git repository' 'test_git_co master'
  49
  50test_expect_success 'check a file that was imported once' '
  51
  52        test_cmp_branch_file master imported-once.txt
  53
  54'
  55
  56test_expect_failure 'check a file that was imported twice' '
  57
  58        test_cmp_branch_file master imported-twice.txt
  59
  60'
  61
  62test_expect_success 'check a file that was imported then modified on HEAD' '
  63
  64        test_cmp_branch_file master imported-modified.txt
  65
  66'
  67
  68test_expect_success 'check a file that was imported, modified, then imported again' '
  69
  70        test_cmp_branch_file master imported-modified-imported.txt
  71
  72'
  73
  74test_expect_success 'check a file that was added to HEAD then imported' '
  75
  76        test_cmp_branch_file master added-imported.txt
  77
  78'
  79
  80test_expect_success 'a vendor branch whose tag has been removed' '
  81
  82        test_cmp_branch_file master imported-anonymously.txt
  83
  84'
  85
  86test_done