strace/tests/strace-V.test
Dmitry V. Levin a30d02e902 strace-V.test: cleanup
* tests/strace-V.test: Move config.h parser to a function.
Rename $OUT to $EXP, swap arguments passed to match_diff.
2016-05-09 23:19:37 +00:00

18 lines
295 B
Bash
Executable File

#!/bin/sh
# Check -V option.
. "${srcdir=.}/init.sh"
run_strace -V > "$LOG"
getval()
{
sed -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h
}
printf "%s -- version %s\n" "$(getval PACKAGE_NAME)" "$(getval VERSION)" > "$EXP"
match_diff "$EXP" "$LOG"
rm -f "$EXP"