--- a/test/nocomments.sh Thu Aug 23 17:58:38 2018 +0200 +++ b/test/nocomments.sh Thu Aug 23 19:45:36 2018 +0200 @@ -27,5 +27,18 @@ # POSSIBILITY OF SUCH DAMAGE. # -echo "Verifying correctness of total line count." +echo -n "Verifying correctness of line count without comments: " + +clineprg="$(pwd)/../src/cline" + +cd $srcdir +count=`$clineprg -Vs testfile.c --exclude-cstyle-comments` +expected=12 +if [ "$count" -eq "$expected" ]; then + echo "OK." + exit 0; +else + echo "FAIL! $count is not $expected" + exit 1; +fi