-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to check if #190 is resolved
Signed-off-by: rany <[email protected]>
- Loading branch information
Showing
2 changed files
with
1,032 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
# test if prompt file exists | ||
if ! [[ -f "tests/001-long-text.txt" ]] | ||
then | ||
echo "File not found!" | ||
exit 1 | ||
fi | ||
|
||
# spawn | ||
for i in {a..z} | ||
do | ||
edge-tts -f tests/001-long-text.txt --write-media "tests/001-long-text_${i}.mp3" --write-subtitles "tests/001-long-text_${i}.srt" & | ||
done | ||
wait | ||
|
||
# set return code to 0 | ||
ret=0 | ||
|
||
# compare files to make sure all are the same | ||
for i in {a..z} | ||
do | ||
cmp tests/001-long-text_a.mp3 "tests/001-long-text_${i}.mp3" || ret=1 | ||
cmp tests/001-long-text_a.srt "tests/001-long-text_${i}.srt" || ret=1 | ||
done | ||
|
||
# clean up | ||
rm tests/001-long-text_*.mp3 tests/001-long-text_*.srt | ||
|
||
# exit with return code | ||
exit "${ret}" |
Oops, something went wrong.