author | Jonathan Nieder <jrnieder@gmail.com> | |
Wed, 19 Jan 2011 12:40:51 +0000 (06:40 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Jan 2011 18:27:16 +0000 (10:27 -0800) | ||
commit | 786dabecd4766bfda0083491ef543e3b5d1d9f39 | |
tree | cc6783a67f35e906ba0e63e29eb4131d9102f195 | tree | snapshot |
parent | 91c031df677f167ac772a3d6a9b3e391b436615c | commit | diff |
tests: compress the setup tests
New test helpers:
- setup_repo, to initialize a repository or gitfile pointing to a
repository, with core.bare and core.worktree set as specified;
- try_case, to run setup from a given directory and validate the
result, with GIT_DIR and GIT_WORK_TREE set as specified;
- try_repo, to initialize a repository and call "try_case" from the
toplevel and a subdirectory;
- run_wt_tests, to run a battery of tests that check for sane
behavior when GIT_WORK_TREE is set to various positions relative to
the .git dir and cwd.
Use these helpers to make the test shorter, less repetitive, and (one
hopes) easier to understand and modify.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
New test helpers:
- setup_repo, to initialize a repository or gitfile pointing to a
repository, with core.bare and core.worktree set as specified;
- try_case, to run setup from a given directory and validate the
result, with GIT_DIR and GIT_WORK_TREE set as specified;
- try_repo, to initialize a repository and call "try_case" from the
toplevel and a subdirectory;
- run_wt_tests, to run a battery of tests that check for sane
behavior when GIT_WORK_TREE is set to various positions relative to
the .git dir and cwd.
Use these helpers to make the test shorter, less repetitive, and (one
hopes) easier to understand and modify.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1510-repo-setup.sh | diff | blob | history |