I cast, therefore I think I know what I'm doing.
[llvm/msp430.git] / test / Scripts / count
blob1c3d7e0953b2c8fcbdaa7a689d975470023073b1
1 #!/bin/sh
3 # Program: count
5 # Synopsis: Count the number of lines of input on stdin and test that it
6 # matches the specified number.
8 # Syntax: count <number>
10 set -e
11 set -u
12 input_lines=`wc -l`
13 if [ "$input_lines" -ne "$1" ]; then
14 echo "count: expected $1 lines and got ${input_lines}."
15 exit 1
17 exit 0