strace/tests/strace-V.test
Fei Jie c4bb57745a tests: add strace-V.test
* tests/strace-V.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-05-09 23:18:40 +00:00

16 lines
380 B
Bash
Executable File

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