File: testn.sh

package info (click to toggle)
glusterfs 9.2-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 44,016 kB
  • sloc: ansic: 478,310; sh: 49,170; python: 12,964; makefile: 1,945; yacc: 487; lisp: 124; lex: 61; xml: 14
file content (16 lines) | stat: -rwxr-xr-x 435 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
#
# Use this script to identify the command and line-number of test-cases.
#

if [ -z "${1}" -a -z "${2}" ]
then
        echo "Usage: ${0} path/to/test/case.t testnumber"
        exit 1
elif [ -z "${2}" ]
then
        echo "ERROR: The second parameter to ${0} should be a number."
        exit 2
fi

awk '{print FNR " " $0}' ${1} | egrep '^[[:digit:]]+[[:space:]]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)' | sed -n ${2}p