From: Eric Bollengier Date: Mon, 26 Apr 2021 10:04:27 +0000 (+0200) Subject: regress: Add test for new "list events offset=" feature X-Git-Tag: Release-11.3.2~561 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb2fb2670f5f5edb148d493c03762cc9fd996bdb;p=thirdparty%2Fbacula.git regress: Add test for new "list events offset=" feature --- diff --git a/regress/tests/events-test b/regress/tests/events-test index 46d7d9cb0..a9a6457bb 100755 --- a/regress/tests/events-test +++ b/regress/tests/events-test @@ -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