= The cvs-fast-export test suite =

You will need RCS and CVS installed to run these tests.

Warning: The regression tests will fail spuriously if your CVS lacks the
MirOS patches.  These are carried by Debian Linux and derivatives; you can
check by Looking for "MirDebian" in the output of cvs --version.

Ensure there is no CVSROOT folder in any parent directory.

There are mutiple groups of tests in this directory.

== Auxiliary tools ==

visualize::
	Visualize the contents of a test repository or master file
	using the -g option of cvs-fast-export and the dot(1) renderer.

gitwash::
	Canonicalize a git fast-import stream.

== The .tst files ==

One group is generated by the *.tst files.  These are Python scripts
that use the framework in testlifter.py to create CVS or RCS
repositories (extension .repo) using the local installation of CVS or
RCS.

During normal regression tests or rebuilds, cvs-fast-export is run 
against those repositories and the output compared to check files.
The reason for this organization is to make it easier to modify and
elaborate the tests by changing the generator scripts.

The repo rebuilds are expensive - much slower than the cvs-fast-export
runs.  And they need to be done only when the generator scripts change,
not on every change to the cvs-fast-export code.  In order to speed up
normal testing, the repos are left in place until explicitly cleaned.

This group is mainly a stability test.  The *.chk files are part of the
repository and are rebuilt only seldom, when there is genuine reason for 
the behavior of the program to change.

== The master files ==

These are regression tests for individual parsing edge cases that 
consist of individual masters (extension ,v) paired with .chk files
that are git stream outputs.

== Incremental-dump regression ==

This is a specifically crafted test to see if incremental dumping of a 
late section of a repository works.

== Pathological repositories ==

These don't have regression tests yet.

QED.testrepo::
	Contains a branch cycle. The old C code choked on this.
	Under the new code, it's still broken enough not to convert
	correctly, throwing a content mismatch.

missingbranch,v:
	Contains 1.2.2.1 branch but no 1.2.1.1, and 1.4.2.1 branch but no 
	1.4.1.1. Extracted from NetBSD src where this is a real case.
	No commit is generated corresponding to the 1.[24].2.1 revisions.

vendor.testrepo::
	Vendor branching example.  Allegedly created as follows.

-------------------------------------
	mkdir vend-test1.vend
	cd vend-test1.vend
	echo 1 > FILE1
	cvs import -m v1 vend-test1 vend vend_1_0
	cd ..
	cvs co vend-test1
	cd vend-test1
	echo 1 > FILE2
	cvs add FILE2
	cvs commit -m c1
	cd ../vend-test1.vend/
	echo 2 > FILE1
	cvs import -m v2 vend-test1 vend vend_1_1
	cd ../vend-test1/
	cvs up
	echo 2 > FILE2
	cvs commit -m c2
	cvs tag lost-repo-state
	echo 3 > FILE1
	cvs commit -m c3
--------------------------------------

== The t9600 group ==

The t960[1-4] files are tests taken from the git tree for testing the
cvsimport facility, adapted for testing cvs-fast-export directly.  The
t9605 test was composed by Chris Rorvick using the git test framework
but as of December 2013 has not been merged to the git tree.  These
are deliberately malformed repositories that exercise strange corner
cases.

Each repo has a custom-built script using the testlifter framework to check
properties of the CVS repository against properties of the git conversion.
The scripts perform tests equivalent to the Perl scripts in the originals.

Summary of results: 

t9601:
|========================================================================
|                                            | cvsps    | cvs-fast-export
|import a module with a vendor branch        | Succeeds | Succeeds 
|check master out of git repository          | Succeeds | Succeeds 
|check a file imported once                  | Fails    | Succeeds 
|check a file imported twice                 | Succeeds | Succeeds 
|check a file imported then modified on HEAD | Succeeds | Succeeds 
|...imported, modified, then imported again  | Succeeds | Succeeds 
|check a file added to HEAD then imported    | Succeeds | Fails
| a vendor branch whose tag has been removed | Succeeds | Succeeds
|========================================================================

t9602:
|========================================================================
|                                            | cvsps    | cvs-fast-export
|import module                               | Succeeds | Succeeds 
|test branch master                          | Succeeds | Succeeds 
|test branch vendorbranch                    | Succeeds | Succeeds
|test_branch B_FROM_INITIALS                 | Fails    | Succeeds
|test_branch B_FROM_INITIALS_BUT_ONE         | Fails    | Fails
|test_branch B_MIXED                         | Fails    | Succeeds
|test_branch B_SPLI                          | Succeeds | Succeeds
|test branch vendortag                       | Fails    | Succeeds
|test tag T_ALL_INITIAL_FILES                | Succeeds | Succeeds
|test tag T_ALL_INITIAL_FILES_BUT_ONE        | Fails    | Succeeds
|test_tag T_MIXED                            | Fails    | Succeeds
|========================================================================

t9603:
	cvsps fails this test; cvs-fast-export succeeds.

t9604:
	cvsps and cvs-fast-export both succeed at this test.

t9605:
	cvsps fails this test; cvs-fast-export succeeds.

t9606:
	synthetic test of a parsing edge case generared by ChatGPT-5.2
