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
d87441f2
Unverified
Commit
d87441f2
authored
Mar 20, 2019
by
Steven King Jr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore: move tests from status to attr ignore suite
parent
b50e448b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
40 deletions
+25
-40
tests/attr/ignore.c
+25
-0
tests/status/ignore.c
+0
-40
No files found.
tests/attr/ignore.c
View file @
d87441f2
...
...
@@ -372,3 +372,28 @@ void test_attr_ignore__case_sensitive_unignore_does_nothing(void)
assert_is_ignored
(
true
,
"case/file"
);
}
void
test_attr_ignore__ignored_subdirfiles_with_subdir_rule
(
void
)
{
cl_git_rewritefile
(
"attr/.gitignore"
,
"dir/*
\n
"
"!dir/sub1/sub2/**
\n
"
);
assert_is_ignored
(
true
,
"dir/a.test"
);
assert_is_ignored
(
true
,
"dir/sub1/a.test"
);
assert_is_ignored
(
true
,
"dir/sub1/sub2"
);
}
void
test_attr_ignore__ignored_subdirfiles_with_negations
(
void
)
{
cl_git_rewritefile
(
"attr/.gitignore"
,
"dir/*
\n
"
"!dir/a.test
\n
"
);
assert_is_ignored
(
false
,
"dir/a.test"
);
assert_is_ignored
(
true
,
"dir/b.test"
);
assert_is_ignored
(
true
,
"dir/sub1/c.test"
);
}
tests/status/ignore.c
View file @
d87441f2
...
...
@@ -1213,43 +1213,3 @@ void test_status_ignore__unignored_subdirs(void)
assert_is_ignored
(
"dir/a.test"
);
refute_is_ignored
(
"dir/subdir/a.test"
);
}
void
test_status_ignore__ignored_subdirfiles_with_subdir_rule
(
void
)
{
static
const
char
*
test_files
[]
=
{
"empty_standard_repo/dir/a.test"
,
"empty_standard_repo/dir/sub1/sub2/b.test"
,
NULL
};
make_test_data
(
"empty_standard_repo"
,
test_files
);
cl_git_mkfile
(
"empty_standard_repo/.gitignore"
,
"dir/*
\n
"
"!dir/sub1/sub2/**
\n
"
);
assert_is_ignored
(
"dir/a.test"
);
assert_is_ignored
(
"dir/sub1/a.test"
);
assert_is_ignored
(
"dir/sub1/sub2"
);
assert_is_ignored
(
"dir/sub1/sub2/b.test"
);
}
void
test_status_ignore__ignored_subdirfiles_with_negations
(
void
)
{
static
const
char
*
test_files
[]
=
{
"empty_standard_repo/dir/a.test"
,
"empty_standard_repo/dir/b.test"
,
"empty_standard_repo/dir/sub1/c.test"
,
NULL
};
make_test_data
(
"empty_standard_repo"
,
test_files
);
cl_git_mkfile
(
"empty_standard_repo/.gitignore"
,
"dir/*
\n
"
"!dir/a.test
\n
"
);
refute_is_ignored
(
"dir/a.test"
);
assert_is_ignored
(
"dir/b.test"
);
assert_is_ignored
(
"dir/sub1/c.test"
);
}
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