]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add test for new "list events offset=" feature
authorEric Bollengier <eric@baculasystems.com>
Mon, 26 Apr 2021 10:04:27 +0000 (12:04 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:01 +0000 (09:03 +0100)
regress/tests/events-test

index 46d7d9cb094eb94228e5bad1bdf4a6f8950c993f..a9a6457bb58dc069ec9f805f9414a4d36d0d01fe 100755 (executable)
@@ -79,6 +79,12 @@ llist events code=DJ0001
 @# Sending .jlist output only in log9.out
 @output $tmp/log9.out
 .jlist events
+@$out $tmp/log10.out
+llist events limit=1
+@$out $tmp/log11.out
+llist events limit=1 offset=1
+@$out $tmp/log12.out
+llist events limit=2
 quit
 END_OF_DATA
 
@@ -190,5 +196,37 @@ if [ $? != 0 ]; then
     estat=1
 fi
 
+nb=`grep -i events: $tmp/log10.out | wc -l`
+if [ $nb != 1 ]; then
+    print_debug "ERROR: Need to find only one event in $tmp/log10.out"
+    estat=1
+fi
+
+nb=`grep -i events: $tmp/log11.out | wc -l`
+if [ $nb != 1 ]; then
+    print_debug "ERROR: Need to find only one event in $tmp/log11.out"
+    estat=1
+fi
+
+nb=`grep -i events: $tmp/log12.out | wc -l`
+if [ $nb != 2 ]; then
+    print_debug "ERROR: Need to find only one event in $tmp/log12.out"
+    estat=1
+fi
+
+a=`grep -i events: $tmp/log10.out`
+grep "$a" $tmp/log12.out > /dev/null
+if [ $? != 0 ]; then
+    print_debug "ERROR: Need the event $a in $tmp/log12.out"
+    estat=1
+fi
+
+a=`grep -i events: $tmp/log9.out`
+grep "$a" $tmp/log12.out > /dev/null
+if [ $? != 0 ]; then
+    print_debug "ERROR: Need the event $a in $tmp/log12.out"
+    estat=1
+fi
+
 
 end_test