?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

# run sjasmplus in a ways to display help page, check output to be at least 10 lines long in each case
# sjasmplus sets exit code to "1" when no option was used, but when "-h" or "--help"
# was used, then exit code is "0", so the "||" and "&&" are mixed to correctly catch these
# but after that the diff and other tests should be run with "&&" of course
$MEMCHECK "$EXE" > noopt.msglst ||\
$MEMCHECK "$EXE" -Wno-behost -h> h.msglst &&\
$MEMCHECK "$EXE" -Wno-behost --help > help.msglst &&\
$MEMCHECK "$EXE" -Wno-behost --help=warnings > warnings.msglst &&\
diff help.msglst noopt.msglst &&\
diff help.msglst h.msglst &&\
help_lines=`wc -l < help.msglst` &&\
echo "Help lines count: ${help_lines} (must be at least 20 to pass the test)" &&\
warnings_lines=`wc -l < warnings.msglst` &&\
echo "Warnings help lines count: ${warnings_lines} (must be at least 10 to pass the test)" &&\
[[ 20 -le ${help_lines} && 10 -le ${warnings_lines} ]] ;
last_result=$?