提交 786dabec 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

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: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 91c031df
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册