diff options
author | Petr Baudis <pasky@ucw.cz> | 2005-05-15 01:34:22 +0200 |
---|---|---|
committer | Petr Baudis <xpasky@machine.sinus.cz> | 2005-05-15 01:34:22 +0200 |
commit | f50c9f76ca516051e9f7e7ef68d6a4d0f5830dda (patch) | |
tree | 832125b4dc4b9f9a04d6af23839b506f812a7eb2 | |
parent | [PATCH 2/2] Test framework documentation. (diff) | |
download | tgif-f50c9f76ca516051e9f7e7ef68d6a4d0f5830dda.tar.xz |
Rename some test scripts and describe the naming convention
First digit: "family", e.g. the absolute basics and global stuff (0),
the basic db-side commands (read-tree, write-tree, commit-tree), the
basic working-tree-side commands (checkout-cache, update-cache), the
other basic commands (ls-files), the diff commands, the pull commands,
exporting commands, revision tree commands...
Second digit: the particular command we are testing
Third digit: (optionally) the particular switch or group of switches
we are testing
Freeform part: commandname-details
Described in the README.
mv t1000-checkout-cache.sh t2000-checkout-cache-clash.sh
mv t1001-checkout-cache.sh t2001-checkout-cache-clash.sh
mv t0200-update-cache.sh t2010-update-cache-badpath.sh
mv t0400-ls-files.sh t3000-ls-files-others.sh
mv t0500-ls-files.sh t3010-ls-files-killed.sh
-rw-r--r-- | t/README | 27 | ||||
-rwxr-xr-x | t/t2000-checkout-cache-clash.sh (renamed from t/t1000-checkout-cache.sh) | 0 | ||||
-rwxr-xr-x | t/t2001-checkout-cache-clash.sh (renamed from t/t1001-checkout-cache.sh) | 0 | ||||
-rwxr-xr-x | t/t2010-update-cache-badpath.sh (renamed from t/t0200-update-cache.sh) | 0 | ||||
-rwxr-xr-x | t/t3000-ls-files-others.sh (renamed from t/t0400-ls-files.sh) | 0 | ||||
-rwxr-xr-x | t/t3010-ls-files-killed.sh (renamed from t/t0500-ls-files.sh) | 0 |
6 files changed, 26 insertions, 1 deletions
@@ -55,6 +55,31 @@ You can pass --verbose (or -v), --debug (or -d), and --immediate failed test. +Naming Tests +------------ + +The test files are named as: + + tNNNN-commandname-details.sh + +where N is a decimal digit. + +First digit tells the family: + + 0 - the absolute basics and global stuff + 1 - the basic commands concerning database + 2 - the basic commands concerning the working tree + 3 - the other basic commands (e.g. ls-files) + 4 - the diff commands + 5 - the pull and exporting commands + 6 - the revision tree commands (even e.g. merge-base) + +Second digit tells the particular command we are testing. + +Third digit (optionally) tells the particular switch or group of switches +we are testing. + + Writing Tests ------------- @@ -72,6 +97,7 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' + Source 'test-lib.sh' -------------------- @@ -94,7 +120,6 @@ This test harness library does the following things: consistently when command line arguments --verbose (or -v), --debug (or -d), and --immediate (or -i) is given. - End with test_done ------------------ diff --git a/t/t1000-checkout-cache.sh b/t/t2000-checkout-cache-clash.sh index a2c42602da..a2c42602da 100755 --- a/t/t1000-checkout-cache.sh +++ b/t/t2000-checkout-cache-clash.sh diff --git a/t/t1001-checkout-cache.sh b/t/t2001-checkout-cache-clash.sh index f0e3d1d8c3..f0e3d1d8c3 100755 --- a/t/t1001-checkout-cache.sh +++ b/t/t2001-checkout-cache-clash.sh diff --git a/t/t0200-update-cache.sh b/t/t2010-update-cache-badpath.sh index 86b7375c6c..86b7375c6c 100755 --- a/t/t0200-update-cache.sh +++ b/t/t2010-update-cache-badpath.sh diff --git a/t/t0400-ls-files.sh b/t/t3000-ls-files-others.sh index 7f93e1cce6..7f93e1cce6 100755 --- a/t/t0400-ls-files.sh +++ b/t/t3000-ls-files-others.sh diff --git a/t/t0500-ls-files.sh b/t/t3010-ls-files-killed.sh index c4d6d2163f..c4d6d2163f 100755 --- a/t/t0500-ls-files.sh +++ b/t/t3010-ls-files-killed.sh |