Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
271680d7
Commit
271680d7
authored
Jan 17, 2013
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a git config, don't run crlf tests on non-win32
parent
75f49ae4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
tests-clar/checkout/crlf.c
+8
-0
tests-clar/resources/crlf/.gitted/config
+0
-0
No files found.
tests-clar/checkout/crlf.c
View file @
271680d7
...
@@ -45,6 +45,7 @@ static void set_core_autocrlf_to(bool value)
...
@@ -45,6 +45,7 @@ static void set_core_autocrlf_to(bool value)
void
test_checkout_crlf__detect_crlf_autocrlf_false
(
void
)
void
test_checkout_crlf__detect_crlf_autocrlf_false
(
void
)
{
{
#ifdef GIT_WIN32
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE_CREATE
;
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE_CREATE
;
...
@@ -53,10 +54,12 @@ void test_checkout_crlf__detect_crlf_autocrlf_false(void)
...
@@ -53,10 +54,12 @@ void test_checkout_crlf__detect_crlf_autocrlf_false(void)
git_checkout_head
(
g_repo
,
&
opts
);
git_checkout_head
(
g_repo
,
&
opts
);
test_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_RAW
);
test_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_RAW
);
#endif
}
}
void
test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size
(
void
)
void
test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size
(
void
)
{
{
#ifdef GIT_WIN32
git_index
*
index
;
git_index
*
index
;
const
git_index_entry
*
entry
;
const
git_index_entry
*
entry
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
...
@@ -72,10 +75,12 @@ void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void)
...
@@ -72,10 +75,12 @@ void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void)
cl_assert
(
entry
->
file_size
==
strlen
(
ALL_LF_TEXT_RAW
));
cl_assert
(
entry
->
file_size
==
strlen
(
ALL_LF_TEXT_RAW
));
git_index_free
(
index
);
git_index_free
(
index
);
#endif
}
}
void
test_checkout_crlf__detect_crlf_autocrlf_true
(
void
)
void
test_checkout_crlf__detect_crlf_autocrlf_true
(
void
)
{
{
#ifdef GIT_WIN32
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE_CREATE
;
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE_CREATE
;
...
@@ -84,10 +89,12 @@ void test_checkout_crlf__detect_crlf_autocrlf_true(void)
...
@@ -84,10 +89,12 @@ void test_checkout_crlf__detect_crlf_autocrlf_true(void)
git_checkout_head
(
g_repo
,
&
opts
);
git_checkout_head
(
g_repo
,
&
opts
);
test_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_AS_CRLF
);
test_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_AS_CRLF
);
#endif
}
}
void
test_checkout_crlf__autocrlf_true_index_size_is_filtered_size
(
void
)
void
test_checkout_crlf__autocrlf_true_index_size_is_filtered_size
(
void
)
{
{
#ifdef GIT_WIN32
git_index
*
index
;
git_index
*
index
;
const
git_index_entry
*
entry
;
const
git_index_entry
*
entry
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
...
@@ -103,4 +110,5 @@ void test_checkout_crlf__autocrlf_true_index_size_is_filtered_size(void)
...
@@ -103,4 +110,5 @@ void test_checkout_crlf__autocrlf_true_index_size_is_filtered_size(void)
cl_assert
(
entry
->
file_size
==
strlen
(
ALL_LF_TEXT_AS_CRLF
));
cl_assert
(
entry
->
file_size
==
strlen
(
ALL_LF_TEXT_AS_CRLF
));
git_index_free
(
index
);
git_index_free
(
index
);
#endif
}
}
tests-clar/resources/crlf/.gitted/config
0 → 100644
View file @
271680d7
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment