X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=t%2FREADME;h=ac5a3ac563407c2450452689bde66962b0fa6b2e;hb=476d23980417ea0b476735d1ad971f9b66b4e032;hp=146e261934598694c750d0fe0357ab4a25d88d83;hpb=f50c9f76ca516051e9f7e7ef68d6a4d0f5830dda;p=git.git diff --git a/t/README b/t/README index 146e2619..ac5a3ac5 100644 --- a/t/README +++ b/t/README @@ -20,9 +20,9 @@ the tests. *** t0000-basic.sh *** * ok 1: .git/objects should be empty after git-init-db in an empty repo. * ok 2: .git/objects should have 256 subdirectories. - * ok 3: git-update-cache without --add should fail adding. + * ok 3: git-update-index without --add should fail adding. ... - * ok 23: no diff after checkout and git-update-cache --refresh. + * ok 23: no diff after checkout and git-update-index --refresh. * passed all 23 test(s) *** t0100-environment-names.sh *** * ok 1: using old names should issue warnings. @@ -32,8 +32,8 @@ the tests. Or you can run each test individually from command line, like this: - $ sh ./t0500-ls-files.sh - * ok 1: git-update-cache --add to add various paths. + $ sh ./t3001-ls-files-killed.sh + * ok 1: git-update-index --add to add various paths. * ok 2: git-ls-files -k to show killed files. * ok 3: validate git-ls-files -k output. * passed all 3 test(s) @@ -79,6 +79,14 @@ Second digit tells the particular command we are testing. Third digit (optionally) tells the particular switch or group of switches we are testing. +If you create files under t/ directory (i.e. here) that is not +the top-level test script, never name the file to match the above +pattern. The Makefile here considers all such files as the +top-level test script and tries to run all of them. A care is +especially needed if you are creating a common test library +file, similar to test-lib.sh, because such a library file may +not be suitable for standalone execution. + Writing Tests ------------- @@ -92,7 +100,7 @@ assignment to variable 'test_description', like this: # Copyright (c) 2005 Junio C Hamano # - test_description=xxx test (option --frotz) + test_description='xxx test (option --frotz) This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' @@ -120,6 +128,7 @@ 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 ------------------ @@ -154,8 +163,8 @@ library for your script to use. Example: test_expect_failure \ - 'git-update-cache without --add should fail adding.' \ - 'git-update-cache should-be-empty' + 'git-update-index without --add should fail adding.' \ + 'git-update-index should-be-empty' - test_debug