]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Add two new tests for para_server.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 29 Sep 2022 15:52:45 +0000 (17:52 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 11 Mar 2023 18:16:17 +0000 (19:16 +0100)
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.

t/audio_files/short-44100-2.mp3 [new file with mode: 0644]
t/t0004-server.sh

diff --git a/t/audio_files/short-44100-2.mp3 b/t/audio_files/short-44100-2.mp3
new file mode 100644 (file)
index 0000000..917d59d
Binary files /dev/null and b/t/audio_files/short-44100-2.mp3 differ
index 9e681107646e85e0fdcc3e12ec1ed13694376628..f7a407dc9e4bd99a71a3b3e364a6386fc55f1d44 100755 (executable)
@@ -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'