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
8f0d5cde
Commit
8f0d5cde
authored
Dec 29, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: update error message checking
parent
909d5494
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
tests/fetchhead/nonetwork.c
+2
-2
tests/odb/backend/nobackend.c
+1
-1
tests/refs/branches/upstream.c
+1
-1
tests/refs/reflog/reflog.c
+1
-1
No files found.
tests/fetchhead/nonetwork.c
View file @
8f0d5cde
...
...
@@ -293,7 +293,7 @@ void test_fetchhead_nonetwork__invalid_for_merge(void)
cl_git_rewritefile
(
"./test1/.git/FETCH_HEAD"
,
"49322bb17d3acc9146f98c97d078513228bbf3c0
\t
invalid-merge
\t\n
"
);
cl_git_fail
(
git_repository_fetchhead_foreach
(
g_repo
,
read_noop
,
NULL
));
cl_assert
(
git__prefixcmp
(
giterr_last
()
->
message
,
"
I
nvalid for-merge"
)
==
0
);
cl_assert
(
git__prefixcmp
(
giterr_last
()
->
message
,
"
i
nvalid for-merge"
)
==
0
);
}
void
test_fetchhead_nonetwork__invalid_description
(
void
)
...
...
@@ -304,7 +304,7 @@ void test_fetchhead_nonetwork__invalid_description(void)
cl_git_rewritefile
(
"./test1/.git/FETCH_HEAD"
,
"49322bb17d3acc9146f98c97d078513228bbf3c0
\t
not-for-merge
\n
"
);
cl_git_fail
(
git_repository_fetchhead_foreach
(
g_repo
,
read_noop
,
NULL
));
cl_assert
(
git__prefixcmp
(
giterr_last
()
->
message
,
"
I
nvalid description"
)
==
0
);
cl_assert
(
git__prefixcmp
(
giterr_last
()
->
message
,
"
i
nvalid description"
)
==
0
);
}
static
int
assert_master_for_merge
(
const
char
*
ref
,
const
char
*
url
,
const
git_oid
*
id
,
unsigned
int
is_merge
,
void
*
data
)
...
...
tests/odb/backend/nobackend.c
View file @
8f0d5cde
...
...
@@ -40,7 +40,7 @@ void test_odb_backend_nobackend__write_fails_gracefully(void)
cl_git_fail
(
git_odb_write
(
&
id
,
odb
,
"Hello world!
\n
"
,
13
,
GIT_OBJ_BLOB
));
err
=
giterr_last
();
cl_assert_equal_s
(
err
->
message
,
"
C
annot write object - unsupported in the loaded odb backends"
);
cl_assert_equal_s
(
err
->
message
,
"
c
annot write object - unsupported in the loaded odb backends"
);
git_odb_free
(
odb
);
}
tests/refs/branches/upstream.c
View file @
8f0d5cde
...
...
@@ -175,7 +175,7 @@ void test_refs_branches_upstream__no_fetch_refspec(void)
cl_git_pass
(
git_reference_lookup
(
&
branch
,
repo
,
"refs/heads/test"
));
cl_git_pass
(
git_reference_create
(
&
ref
,
repo
,
"refs/remotes/matching/master"
,
git_reference_target
(
branch
),
1
,
"fetch"
));
cl_git_fail
(
git_branch_set_upstream
(
branch
,
"matching/master"
));
cl_assert_equal_s
(
"
C
ould not determine remote for 'refs/remotes/matching/master'"
,
cl_assert_equal_s
(
"
c
ould not determine remote for 'refs/remotes/matching/master'"
,
giterr_last
()
->
message
);
/* we can't set it automatically, so let's test the user setting it by hand */
...
...
tests/refs/reflog/reflog.c
View file @
8f0d5cde
...
...
@@ -261,7 +261,7 @@ void test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error
error
=
giterr_last
();
cl_assert
(
error
!=
NULL
);
cl_assert_equal_s
(
"
U
nable to parse OID - contains invalid characters"
,
error
->
message
);
cl_assert_equal_s
(
"
u
nable to parse OID - contains invalid characters"
,
error
->
message
);
git_reference_free
(
ref
);
git_buf_free
(
&
logpath
);
...
...
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