universe@56: #!/bin/sh universe@56: # universe@56: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. universe@56: # universe@56: # Copyright 2018 Mike Becker. All rights reserved. universe@56: # universe@56: # Redistribution and use in source and binary forms, with or without universe@56: # modification, are permitted provided that the following conditions are met: universe@56: # universe@56: # 1. Redistributions of source code must retain the above copyright universe@56: # notice, this list of conditions and the following disclaimer. universe@56: # universe@56: # 2. Redistributions in binary form must reproduce the above copyright universe@56: # notice, this list of conditions and the following disclaimer in the universe@56: # documentation and/or other materials provided with the distribution. universe@56: # universe@56: # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@56: # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@56: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE universe@56: # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE universe@56: # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR universe@56: # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF universe@56: # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS universe@56: # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN universe@56: # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) universe@56: # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE universe@56: # POSSIBILITY OF SUCH DAMAGE. universe@56: # universe@56: universe@57: echo -n "Verifying correctness of total line count: " universe@56: universe@57: clineprg="$(pwd)/../src/cline" universe@57: universe@57: cd $srcdir universe@57: count=`$clineprg -Vs testfile.c` universe@57: expected=21 universe@57: universe@57: if [ "$count" -eq "$expected" ]; then universe@57: echo "OK." universe@57: exit 0; universe@57: else universe@57: echo "FAIL! $count is not $expected" universe@57: exit 1; universe@57: fi