From nobody Wed Nov 16 05:20:52 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NBrx06vfHz4dFnL; Wed, 16 Nov 2022 05:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NBrx069qcz3JNZ; Wed, 16 Nov 2022 05:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668576052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjJHChKw9AQnN0ofappIUfR73JQsDB9rufgqXE6fhTo=; b=Hn+QjC0KIcNCT3MGOBCU6fThQS87CQNuDYJWWN+f/wWk5u0nTlkOcEAMZCM6BxPR+sLqq0 aiZXAgAuTEoxpiIDiNJDMT3XA/d/iQC1OG9sCdZKCtySgnPyn/b8d/6jQbd2OmiVOVlQjv 6cNYXSe8hQLWHpDn+8x6ewlmAA4hXX/vGMzAl49llFhFym1gFwMTN91MiztJWQ3bY40J6I lupkfG7jR735u6mWXS9y/4xUQG4fCRWiu/RmqKTyIUePNPaOOWVkbQ/6j4vZMJc7afbK7G LQl5vO5AbfE3wZJ7WHKSf2M0TUfi/XdYs31AgxyuYYO8bTDv+ebumX0hEy3R4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668576052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjJHChKw9AQnN0ofappIUfR73JQsDB9rufgqXE6fhTo=; b=NvnvdZBkx7Te0dxEkbZoryRrmgbNIzOUHFPwPCA7u2AibuEolqcIcvuZe1N1f7mc6N8bfw IpZy1zLvNNNFgKLDQaPGRPA50+I6btkxsR1tYx5DY2d+5TJU795CshbFf+I9WKAfzUpPOL xgME8R2kFVll2BgqSeeRzuOvu7GLXi7erwe2aEzg9ppDw/KTKZswCzRSpUBFM8g3iVvSjo mu9pNMj0HI4fty+ej3+uVDQ/92XenbghSpIX8A1yKFa9GCGl5uouYxL7Q3LncNOo4fUjPp m4ZLEhCbz4rv7e5lwurpIn3IrrnI23MOUTPViO6Oft+3Hx259pKTRaGKEBcxNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668576052; a=rsa-sha256; cv=none; b=x3OqAhKDa4G/3CCvTRg2vMVqmJRwsaxUPzIqV7kw2vSj4JYc2eHl3cIMLcPfxebptzgqlK afPFplEK6gFA6cjjLZ3Cdze/YhJSEV0JL0JCWCFtT4piGgZly0c8iHKCDyxZ6GQFuH3P3k 8Ix9Xx/gLpwU6lEnqqAQmzNvA7naToL949ZNpZMRzqE4aB2r1reT6AdJw+L/yzdeSFsfAx S1UiYGXpuoSpPq0B3zfj0/8ZOoyQBtPFKhjh41F5iiHGIy9+ur+2gIhN96p5vv3AaMdaQI RQp1g6s/Ml6djYraWd8vHHuq1d/8LogqtJsFrbr5x0yGBJS3dTOT1/Mb7EMDmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NBrx056jWzqdR; Wed, 16 Nov 2022 05:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AG5Kq1s021443; Wed, 16 Nov 2022 05:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AG5Kq7E021442; Wed, 16 Nov 2022 05:20:52 GMT (envelope-from git) Date: Wed, 16 Nov 2022 05:20:52 GMT Message-Id: <202211160520.2AG5Kq7E021442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7ad9aa0b9366 - main - rs: Test actual output in the tests. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ad9aa0b9366092a0feb671a2b252faefe3ff7fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad9aa0b9366092a0feb671a2b252faefe3ff7fd commit 7ad9aa0b9366092a0feb671a2b252faefe3ff7fd Author: John Baldwin AuthorDate: 2022-11-16 05:20:18 +0000 Commit: John Baldwin CommitDate: 2022-11-16 05:20:18 +0000 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 <