File: test-functions.sh

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (12 lines) | stat: -rw-r--r-- 221 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
FILE=$1

assert_num_funcs() {
	local num_funcs=$(nm $FILE | grep -i " t " | wc -l)

	if [[ $num_funcs != $1 ]]; then
		echo "$FILE: assertion failed: file has $num_funcs funcs, expected $1" 1>&2
		exit 1
	fi

	return 0
}