Failing test on Windows because of mismatched path separator
YannickJadoul opened this issue · comments
Yannick Jadoul commented
On Windows, test/script/form1.praat
fails (in its call to test/manually/form2.praat
) because of the difference between /
and \
path separators on Unix vs. Windows.
The infile/outfile path gets resolved, but this involves changing the argument's /
to \
.
So appendInfoLine: "Input file: <<", input_file$, ">>"
prints Input file: <<D:\a\Parselmouth\Parselmouth\praat\test\script\2345>>
and assert endsWith (input_file$, "test/script/2345")
fails, shortly after.
I've currently fixed the test the following way, but maybe you know of a better way to do so:
if windows
pathsep$ = "\"
else
pathsep$ = "/"
endif
# if called from test/script/form1.praat:
assert numbers1# = { 16, -17.6, 5 }
assert numbers2# = { 6, 7, 8 }
assert endsWith (input_file$, "test" + pathsep$ + "script" + pathsep$ + "2345") ; should not be possible
assert endsWith (output_file$, "test" + pathsep$ + "script" + pathsep$ + ".." + pathsep$ + "abc.txt")
assert endsWith (folder$, "test" + pathsep$ + "script" + pathsep$ + "subfolder" + pathsep$ + "wav2vec")
assert texture$ = "With holes"
assert any_word$ = "there you are"
Paul Boersma commented
Thanks. This was repaired on August 23.