test/nocomments.sh

changeset 57
68018eac46c3
parent 56
ed65f8c73fb2
child 68
ae763178ee1e
--- 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

mercurial