mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
tests: api: allow both case of pathsep
This commit is contained in:
+5
-2
@@ -630,8 +630,11 @@ main(int argc, char **argv)
|
||||
(void)argc; // unused parameter
|
||||
|
||||
char *progdir = strdup(argv[0]);
|
||||
char *dir = strrchr(progdir, PATHSEP);
|
||||
if (dir != NULL) *dir = 0;
|
||||
|
||||
// Path separator on windows may be both '/' and '\'
|
||||
char *dir;
|
||||
if ((dir = strrchr(progdir, PATHSEP)) != NULL) *dir = 0;
|
||||
else if ((dir = strrchr(progdir, '/')) != NULL) *dir = 0;
|
||||
|
||||
test_espeak_terminate_without_initialize();
|
||||
test_espeak_initialize();
|
||||
|
||||
Reference in New Issue
Block a user