From: Andre Noll Date: Thu, 29 Sep 2022 15:52:45 +0000 (+0200) Subject: Add two new tests for para_server. X-Git-Tag: v0.7.3~31 X-Git-Url: http://git.tuebingen.mpg.de/releases/paraslash-0.4.13.tar.bz2?a=commitdiff_plain;h=2b838f7e906422c84f9fce013743eaf7299b2c02;p=paraslash.git Add two new tests for para_server. In a (non-public) development branch the add subcommand was broken although t0004-server exercises this subcommand and reported no error. The bug went unnoticed because it would only bite when the subcommand was given a directory to add, but the test specifies a pathname which refers to a regular file. To detect such breakage early, add a test which tries to add a directory and another which exercises the rm command. --- diff --git a/t/audio_files/short-44100-2.mp3 b/t/audio_files/short-44100-2.mp3 new file mode 100644 index 00000000..917d59df Binary files /dev/null and b/t/audio_files/short-44100-2.mp3 differ diff --git a/t/t0004-server.sh b/t/t0004-server.sh index 9e681107..f7a407dc 100755 --- a/t/t0004-server.sh +++ b/t/t0004-server.sh @@ -37,6 +37,18 @@ cmdline[$i]="init" good[$i]='^successfully' bad[$i]='!^successfully' +let i++ +commands[$i]='add_dir' +required_objects[$i]='ogg_afh' +cmdline[$i]="add -v $test_audio_file_dir" +good[$i]='^adding' + +let i++ +commands[$i]='rm' +required_objects[$i]='ogg_afh' +cmdline[$i]="rm -v $test_audio_file_dir/*" +good[$i]='^removing' + let i++ commands[$i]="add_ogg" required_objects[$i]='ogg_afh'