Skip to content

Commit

Permalink
Tmain: add a case for testing the behavior of readtags with no action
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Sep 14, 2024
1 parent 02d0bcd commit e86284f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tmain/readtags-error-no-action.d/exit-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Empty file.
29 changes: 29 additions & 0 deletions Tmain/readtags-error-no-action.d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# Copyright: 2024 Masatake YAMATO
# License: GPL-2

BUILDDIR=$2
READTAGS=$3
#V="valgrind --leak-check=full --track-origins=yes -v"
V=

. ../utils.sh

if ! [ -x "${READTAGS}" ]; then
skip "no readtags"
fi

f=${BUILDDIR}/tmp-readtags-error-no-action-$$
rm -f "$f"

{
${READTAGS} -t input.tags
} 2> "$f"

s=$?

sed 's|.*\(readtags[^:]*\):|\1:|' < "$f" 1>&2
rm "$f"

exit $s
1 change: 1 addition & 0 deletions Tmain/readtags-error-no-action.d/stderr-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
readtags: no action specified: specify one of NAME, -l or -D
Empty file.

0 comments on commit e86284f

Please sign in to comment.