From owner-svn-src-head@freebsd.org Sat Aug 12 19:17:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C3D8DC6561; Sat, 12 Aug 2017 19:17:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 668656E362; Sat, 12 Aug 2017 19:17:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7CJHnME035284; Sat, 12 Aug 2017 19:17:49 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7CJHmUp035277; Sat, 12 Aug 2017 19:17:48 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201708121917.v7CJHmUp035277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 12 Aug 2017 19:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322438 - in head: bin/sh/tests bin/sh/tests/invocation etc/mtree X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in head: bin/sh/tests bin/sh/tests/invocation etc/mtree X-SVN-Commit-Revision: 322438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2017 19:17:50 -0000 Author: jilles Date: Sat Aug 12 19:17:48 2017 New Revision: 322438 URL: https://svnweb.freebsd.org/changeset/base/322438 Log: sh: Add tests for sh -c that already pass. PR: 220587 Submitted by: Ryan Moeller Added: head/bin/sh/tests/invocation/ head/bin/sh/tests/invocation/Makefile (contents, props changed) head/bin/sh/tests/invocation/sh-ac1.0 (contents, props changed) head/bin/sh/tests/invocation/sh-c1.0 (contents, props changed) head/bin/sh/tests/invocation/sh-ca1.0 (contents, props changed) head/bin/sh/tests/invocation/sh-fca1.0 (contents, props changed) Modified: head/bin/sh/tests/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/sh/tests/Makefile ============================================================================== --- head/bin/sh/tests/Makefile Sat Aug 12 18:42:54 2017 (r322437) +++ head/bin/sh/tests/Makefile Sat Aug 12 19:17:48 2017 (r322438) @@ -6,6 +6,7 @@ TESTS_SUBDIRS+= builtins TESTS_SUBDIRS+= errors TESTS_SUBDIRS+= execution TESTS_SUBDIRS+= expansion +TESTS_SUBDIRS+= invocation TESTS_SUBDIRS+= parameters TESTS_SUBDIRS+= parser TESTS_SUBDIRS+= set-e Added: head/bin/sh/tests/invocation/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/invocation/Makefile Sat Aug 12 19:17:48 2017 (r322438) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} + +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +${PACKAGE}FILES+= sh-ac1.0 +${PACKAGE}FILES+= sh-c1.0 +${PACKAGE}FILES+= sh-ca1.0 +${PACKAGE}FILES+= sh-fca1.0 + +.include Added: head/bin/sh/tests/invocation/sh-ac1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/invocation/sh-ac1.0 Sat Aug 12 19:17:48 2017 (r322438) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# Test that attached options before c are processed + +case `${SH} -ac 'echo $-:$0' moo` in +*a*:moo) true ;; +*) false ;; +esac Added: head/bin/sh/tests/invocation/sh-c1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/invocation/sh-c1.0 Sat Aug 12 19:17:48 2017 (r322438) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# Test that -c executes command_string with the given name and arg + +${SH} -c 'echo $0 $@' moo foo | grep -qx -- "moo foo" Added: head/bin/sh/tests/invocation/sh-ca1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/invocation/sh-ca1.0 Sat Aug 12 19:17:48 2017 (r322438) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# Test that attached options after c are processed + +case `${SH} -ca 'echo $-:$0' moo` in +*a*:moo) true ;; +*) false ;; +esac Added: head/bin/sh/tests/invocation/sh-fca1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/invocation/sh-fca1.0 Sat Aug 12 19:17:48 2017 (r322438) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# Test that attached options before and after c are processed + +case `${SH} -fca 'echo $-:$-:$0:$@' foo -bar` in +*f*:*a*:foo:-bar) true ;; +*) false ;; +esac Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat Aug 12 18:42:54 2017 (r322437) +++ head/etc/mtree/BSD.tests.dist Sat Aug 12 19:17:48 2017 (r322438) @@ -39,6 +39,8 @@ .. expansion .. + invocation + .. parameters .. parser