Browse Source

tests: api: allow both case of pathsep

master
Yury Popov 2 years ago
parent
commit
ccc00f9278
No account linked to committer's email address
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      tests/api.c

+ 5
- 2
tests/api.c View File

@@ -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();

Loading…
Cancel
Save