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
a89a756d
Commit
a89a756d
authored
Jul 13, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submodule: add failing test for backslash in url
parent
38dc9940
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
tests/submodule/lookup.c
+23
-0
No files found.
tests/submodule/lookup.c
View file @
a89a756d
...
...
@@ -151,6 +151,29 @@ void test_submodule_lookup__lookup_even_with_missing_index(void)
test_submodule_lookup__simple_lookup
();
/* baseline should still pass */
}
void
test_submodule_lookup__backslashes
(
void
)
{
git_config
*
cfg
;
git_submodule
*
sm
;
git_repository
*
subrepo
;
git_buf
buf
=
GIT_BUF_INIT
;
const
char
*
backslashed_path
=
"..
\\
submod2_target"
;
cl_git_pass
(
git_config_open_ondisk
(
&
cfg
,
"submod2/.gitmodules"
));
cl_git_pass
(
git_config_set_string
(
cfg
,
"submodule.sm_unchanged.url"
,
backslashed_path
));
git_config_free
(
cfg
);
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"sm_unchanged"
));
cl_assert_equal_s
(
backslashed_path
,
git_submodule_url
(
sm
));
cl_git_pass
(
git_submodule_open
(
&
subrepo
,
sm
));
cl_git_pass
(
git_submodule_resolve_url
(
&
buf
,
g_repo
,
backslashed_path
));
git_buf_free
(
&
buf
);
git_submodule_free
(
sm
);
git_repository_free
(
subrepo
);
}
static
void
baseline_tests
(
void
)
{
/* small baseline that should work even if we change the index or make
...
...
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