Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sylvain Joubert
KWSys
Commits
c0505b60
Commit
c0505b60
authored
19 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Adding test of running executable with forward slashes on windows.
parent
5ec3598d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testProcess.c
+24
-0
24 additions, 0 deletions
testProcess.c
with
24 additions
and
0 deletions
testProcess.c
+
24
−
0
View file @
c0505b60
...
...
@@ -296,7 +296,28 @@ int main(int argc, const char* argv[])
double
timeouts
[
6
]
=
{
10
,
10
,
10
,
10
,
30
,
10
};
int
r
;
const
char
*
cmd
[
4
];
#ifdef _WIN32
char
*
argv0
=
0
;
if
(
n
==
0
&&
(
argv0
=
strdup
(
argv
[
0
])))
{
/* Try converting to forward slashes to see if it works. */
char
*
c
;
for
(
c
=
argv0
;
*
c
;
++
c
)
{
if
(
*
c
==
'\\'
)
{
*
c
=
'/'
;
}
}
cmd
[
0
]
=
argv0
;
}
else
{
cmd
[
0
]
=
argv
[
0
];
}
#else
cmd
[
0
]
=
argv
[
0
];
#endif
cmd
[
1
]
=
"run"
;
cmd
[
2
]
=
argv
[
1
];
cmd
[
3
]
=
0
;
...
...
@@ -310,6 +331,9 @@ int main(int argc, const char* argv[])
fprintf
(
stderr
,
"Output on stderr after test %d.
\n
"
,
n
);
fflush
(
stdout
);
fflush
(
stderr
);
#if _WIN32
if
(
argv0
)
{
free
(
argv0
);
}
#endif
return
r
;
}
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment