summaryrefslogtreecommitdiff
path: root/tests/checkout/crlf.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-12-01 18:32:01 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-12-03 13:08:25 -0800
commit13a8bc924c16865a5409fa34994ec3bb11e1c4b5 (patch)
treeb4908b0ad01a338f8b4569c8ccc06556d816b955 /tests/checkout/crlf.c
parent788fccc40b28cea2e15bb7a0cafc706bb86d13c1 (diff)
downloadlibgit2-13a8bc924c16865a5409fa34994ec3bb11e1c4b5.tar.gz
crlf_data: move to a "to_workdir" folder
Move the crlf_data folders reponsible for holding the state of the filters going into the working directory to "to_workdir" variations of the folder name to accommodate future growth into the "to odb" filter variation. Update the script to create these new folders as appopriate.
Diffstat (limited to 'tests/checkout/crlf.c')
-rw-r--r--tests/checkout/crlf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c
index ed9745d8d..94fd8a6b4 100644
--- a/tests/checkout/crlf.c
+++ b/tests/checkout/crlf.c
@@ -99,6 +99,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
{
git_buf attrbuf = GIT_BUF_INIT;
git_buf expected_dirname = GIT_BUF_INIT;
+ git_buf systype_and_direction = GIT_BUF_INIT;
git_buf sandboxname = GIT_BUF_INIT;
git_buf reponame = GIT_BUF_INIT;
git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
@@ -107,6 +108,9 @@ static void test_checkout(const char *autocrlf, const char *attrs)
git_buf_puts(&reponame, "crlf");
+ git_buf_puts(&systype_and_direction, systype);
+ git_buf_puts(&systype_and_direction, "_to_workdir");
+
git_buf_puts(&sandboxname, "autocrlf_");
git_buf_puts(&sandboxname, autocrlf);
@@ -128,7 +132,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
cl_repo_set_string(g_repo, "core.autocrlf", autocrlf);
- git_buf_joinpath(&expected_dirname, systype, sandboxname.ptr);
+ git_buf_joinpath(&expected_dirname, systype_and_direction.ptr, sandboxname.ptr);
git_buf_joinpath(&expected_fixture, "crlf_data", expected_dirname.ptr);
cl_fixture_sandbox(expected_fixture.ptr);
@@ -145,6 +149,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
git_buf_dispose(&expected_fixture);
git_buf_dispose(&expected_dirname);
git_buf_dispose(&sandboxname);
+ git_buf_dispose(&systype_and_direction);
git_buf_dispose(&reponame);
}
@@ -173,7 +178,7 @@ void test_checkout_crlf__matches_core_git(void)
const char *autocrlf[] = { "true", "false", "input", NULL };
const char *attrs[] = { "", "-crlf", "-text", "eol=crlf", "eol=lf",
"text", "text eol=crlf", "text eol=lf",
- "text=auto", "text=auto eol=crlf", "text=auto eol=lf",
+ "text=auto", "text=auto eol=crlf", "text=auto eol=lf",
NULL };
const char **a, **b;