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
fdaa9240
Commit
fdaa9240
authored
Jan 11, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up status tests
parent
df743c7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
tests/t18-status.c
+9
-3
No files found.
tests/t18-status.c
View file @
fdaa9240
...
@@ -64,6 +64,7 @@ END_TEST
...
@@ -64,6 +64,7 @@ END_TEST
static
const
char
*
entry_paths0
[]
=
{
static
const
char
*
entry_paths0
[]
=
{
"file_deleted"
,
"file_deleted"
,
"ignored_file"
,
"modified_file"
,
"modified_file"
,
"new_file"
,
"new_file"
,
"staged_changes"
,
"staged_changes"
,
...
@@ -82,6 +83,7 @@ static const char *entry_paths0[] = {
...
@@ -82,6 +83,7 @@ static const char *entry_paths0[] = {
static
const
unsigned
int
entry_statuses0
[]
=
{
static
const
unsigned
int
entry_statuses0
[]
=
{
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_IGNORED
,
GIT_STATUS_WT_MODIFIED
,
GIT_STATUS_WT_MODIFIED
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_INDEX_MODIFIED
,
GIT_STATUS_INDEX_MODIFIED
,
...
@@ -98,7 +100,7 @@ static const unsigned int entry_statuses0[] = {
...
@@ -98,7 +100,7 @@ static const unsigned int entry_statuses0[] = {
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
};
};
#define ENTRY_COUNT0 1
4
#define ENTRY_COUNT0 1
5
struct
status_entry_counts
{
struct
status_entry_counts
{
int
wrong_status_flags_count
;
int
wrong_status_flags_count
;
...
@@ -185,6 +187,7 @@ END_TEST
...
@@ -185,6 +187,7 @@ END_TEST
static
const
char
*
entry_paths2
[]
=
{
static
const
char
*
entry_paths2
[]
=
{
"current_file"
,
"current_file"
,
"file_deleted"
,
"file_deleted"
,
"ignored_file"
,
"modified_file"
,
"modified_file"
,
"staged_changes"
,
"staged_changes"
,
"staged_changes_file_deleted"
,
"staged_changes_file_deleted"
,
...
@@ -202,6 +205,7 @@ static const char *entry_paths2[] = {
...
@@ -202,6 +205,7 @@ static const char *entry_paths2[] = {
static
const
unsigned
int
entry_statuses2
[]
=
{
static
const
unsigned
int
entry_statuses2
[]
=
{
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_IGNORED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
|
GIT_STATUS_INDEX_MODIFIED
,
GIT_STATUS_WT_DELETED
|
GIT_STATUS_INDEX_MODIFIED
,
GIT_STATUS_WT_DELETED
|
GIT_STATUS_INDEX_MODIFIED
,
GIT_STATUS_WT_DELETED
|
GIT_STATUS_INDEX_MODIFIED
,
...
@@ -216,7 +220,7 @@ static const unsigned int entry_statuses2[] = {
...
@@ -216,7 +220,7 @@ static const unsigned int entry_statuses2[] = {
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
};
};
#define ENTRY_COUNT2 1
4
#define ENTRY_COUNT2 1
5
BEGIN_TEST
(
statuscb2
,
"test retrieving status for a purged worktree of an valid repository"
)
BEGIN_TEST
(
statuscb2
,
"test retrieving status for a purged worktree of an valid repository"
)
git_repository
*
repo
;
git_repository
*
repo
;
...
@@ -261,6 +265,7 @@ static const char *entry_paths3[] = {
...
@@ -261,6 +265,7 @@ static const char *entry_paths3[] = {
"current_file/modified_file"
,
"current_file/modified_file"
,
"current_file/new_file"
,
"current_file/new_file"
,
"file_deleted"
,
"file_deleted"
,
"ignored_file"
,
"modified_file"
,
"modified_file"
,
"new_file"
,
"new_file"
,
"staged_changes"
,
"staged_changes"
,
...
@@ -286,6 +291,7 @@ static const unsigned int entry_statuses3[] = {
...
@@ -286,6 +291,7 @@ static const unsigned int entry_statuses3[] = {
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
GIT_STATUS_IGNORED
,
GIT_STATUS_WT_MODIFIED
,
GIT_STATUS_WT_MODIFIED
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_WT_NEW
,
GIT_STATUS_INDEX_MODIFIED
,
GIT_STATUS_INDEX_MODIFIED
,
...
@@ -302,7 +308,7 @@ static const unsigned int entry_statuses3[] = {
...
@@ -302,7 +308,7 @@ static const unsigned int entry_statuses3[] = {
GIT_STATUS_WT_DELETED
,
GIT_STATUS_WT_DELETED
,
};
};
#define ENTRY_COUNT3 2
2
#define ENTRY_COUNT3 2
3
BEGIN_TEST
(
statuscb3
,
"test retrieving status for a worktree where a file and a subdir have been renamed and some files have been added"
)
BEGIN_TEST
(
statuscb3
,
"test retrieving status for a worktree where a file and a subdir have been renamed and some files have been added"
)
git_repository
*
repo
;
git_repository
*
repo
;
...
...
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