From c4bb57745aafa5ef57a5af7a35a2764239ec010b Mon Sep 17 00:00:00 2001 From: Fei Jie Date: Mon, 9 May 2016 14:19:55 +0800 Subject: [PATCH] tests: add strace-V.test * tests/strace-V.test: New test. * tests/Makefile.am (MISC_TESTS): Add it. --- tests/Makefile.am | 1 + tests/strace-V.test | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 tests/strace-V.test diff --git a/tests/Makefile.am b/tests/Makefile.am index a7b09592..7eae886f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -606,6 +606,7 @@ MISC_TESTS = \ redirect.test \ restart_syscall.test \ strace-T.test \ + strace-V.test \ strace-f.test \ strace-r.test \ strace-t.test \ diff --git a/tests/strace-V.test b/tests/strace-V.test new file mode 100755 index 00000000..c474f885 --- /dev/null +++ b/tests/strace-V.test @@ -0,0 +1,15 @@ +#!/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" -- 2.50.1