test/codeonly.sh

changeset 57
68018eac46c3
parent 56
ed65f8c73fb2
child 68
ae763178ee1e
--- a/test/codeonly.sh	Thu Aug 23 17:58:38 2018 +0200
+++ b/test/codeonly.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 code only line count: "
+
+clineprg="$(pwd)/../src/cline"
+
+cd $srcdir
+count=`$clineprg -Vs testfile.c --exclude-cstyle-comments --exclude-blank-lines`
+expected=5
 
+if [ "$count" -eq "$expected" ]; then
+    echo "OK."
+    exit 0;
+else
+    echo "FAIL! $count is not $expected"
+    exit 1;
+fi

mercurial