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
5fff24ea
Commit
5fff24ea
authored
Jun 05, 2018
by
Patrick Steinhardt
Committed by
Edward Thomson
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: status::ignore: fix style of a test
parent
446b85c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
tests/status/ignore.c
+15
-20
No files found.
tests/status/ignore.c
View file @
5fff24ea
...
...
@@ -1158,29 +1158,24 @@ void test_status_ignore__subdir_ignore_everything_except_certain_files(void)
void
test_status_ignore__deeper
(
void
)
{
int
ignored
;
g_repo
=
cl_git_sandbox_init
(
"empty_standard_repo"
);
cl_git_mkfile
(
"empty_standard_repo/.gitignore
"
,
"*.data
\n
"
"!dont_ignore/*.data
\n
"
)
;
const
char
*
test_files
[]
=
{
"empty_standard_repo/foo.data"
,
"empty_standard_repo/bar.data"
,
"empty_standard_repo/dont_ignore/foo.data"
,
"empty_standard_repo/dont_ignore/bar.data
"
,
NULL
}
;
cl_git_pass
(
p_mkdir
(
"empty_standard_repo/dont_ignore"
,
0777
));
cl_git_mkfile
(
"empty_standard_repo/foo.data"
,
""
);
cl_git_mkfile
(
"empty_standard_repo/bar.data"
,
""
);
cl_git_mkfile
(
"empty_standard_repo/dont_ignore/foo.data"
,
""
);
cl_git_mkfile
(
"empty_standard_repo/dont_ignore/bar.data"
,
""
);
make_test_data
(
"empty_standard_repo"
,
test_files
);
cl_git_mkfile
(
"empty_standard_repo/.gitignore"
,
"*.data
\n
"
"!dont_ignore/*.data
\n
"
);
cl_git_pass
(
git_ignore_path_is_ignored
(
&
ignored
,
g_repo
,
"foo.data"
));
cl_assert_equal_i
(
1
,
ignored
);
cl_git_pass
(
git_ignore_path_is_ignored
(
&
ignored
,
g_repo
,
"bar.data"
));
cl_assert_equal_i
(
1
,
ignored
);
assert_is_ignored
(
"foo.data"
);
assert_is_ignored
(
"bar.data"
);
cl_git_pass
(
git_ignore_path_is_ignored
(
&
ignored
,
g_repo
,
"dont_ignore/foo.data"
));
cl_assert_equal_i
(
0
,
ignored
);
cl_git_pass
(
git_ignore_path_is_ignored
(
&
ignored
,
g_repo
,
"dont_ignore/bar.data"
));
cl_assert_equal_i
(
0
,
ignored
);
refute_is_ignored
(
"dont_ignore/foo.data"
);
refute_is_ignored
(
"dont_ignore/bar.data"
);
}
void
test_status_ignore__unignored_dir_with_ignored_contents
(
void
)
...
...
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