Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0dc993

Browse files
committed
tests/should-fail: Verify exit code 1
Some of these runs were exiting with SIGSEGV but because wewere just checking that the command failed, we masked that error...Fix the test code here to verify that the process exited with code 1.Signed-off-by: Colin Walters <walters@verbum.org>
1 parentc0591cd commitd0dc993

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎tests/test-should-fail.sh‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ shift
77
tmpd=$(mktemp -d -t lcfs-test.XXXXXX)
88
trap'rm -rf -- "$tmpd"' EXIT
99
forfin$@;do
10-
if$bindir/mkcomposefs --from-file$f$tmpd/out.cfs&>/dev/null;then
10+
rc=0
11+
$bindir/mkcomposefs --from-file$f$tmpd/out.cfs>/dev/null2>$tmpd/err.txt|| rc=$?
12+
iftest$rc == 0;then
1113
fatal"Test case$f should have failed"
1214
fi
15+
iftest$rc!= 1;then
16+
cat$tmpd/err.txt
17+
fatal"Test case$f exited with code$rc, not 1"
18+
fi
1319
echo"ok$f"
1420
done

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp