From 7ad9aa0b9366092a0feb671a2b252faefe3ff7fd Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 15 Nov 2022 21:20:18 -0800 Subject: [PATCH] rs: Test actual output in the tests. Previously the tests just verified if command line arguments raised an error or not, they did not test how command line arguments affected the output. This adds some sample (if simple) input and output to each flag test as well as adding a few additional trivial tests. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D36835 --- usr.bin/rs/tests/rs_test.sh | 150 ++++++++++++++++++++++++++++++++---- 1 file changed, 134 insertions(+), 16 deletions(-) diff --git a/usr.bin/rs/tests/rs_test.sh b/usr.bin/rs/tests/rs_test.sh index 1047a6557ae4..bb7df6fa267d 100644 --- a/usr.bin/rs/tests/rs_test.sh +++ b/usr.bin/rs/tests/rs_test.sh @@ -34,7 +34,11 @@ c_flag_head() c_flag_body() { - atf_check -s exit:0 -o empty rs -c < /dev/null + atf_check -s exit:0 -o inline:"1 2 3 4 +5 6 7 8 +" rs -c, 2 <