From 7948ad86578f789cf1c2b92eb9b5c625e26df007 Mon Sep 17 00:00:00 2001 From: Tharre Date: Sun, 13 Sep 2015 22:48:46 +0200 Subject: Add a few tests --- tests/t0010-check_args.t | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tests/t0010-check_args.t (limited to 'tests/t0010-check_args.t') diff --git a/tests/t0010-check_args.t b/tests/t0010-check_args.t new file mode 100755 index 0000000..feae935 --- /dev/null +++ b/tests/t0010-check_args.t @@ -0,0 +1,23 @@ +#!/bin/sh -e +# Copyright (c) 2015 Tharre +# +# This software may be modified and distributed under the terms +# of the MIT license. See the LICENSE file for details. + +test_description='Check arguments supplied to the do-script' + +. ./sharness.sh + +mkdir d && +cat > "d/check_args.ext1.ext2.do" <<'EOF' +#!/bin/sh -e +[ "$1" = "check_args.ext1.ext2" ] +[ "$2" = "check_args.ext1" ] +[ "$3" != "check_args.ext1.ext2" ] +EOF + +test_expect_success "check arguments" " + redo d/check_args.ext1.ext2 +" + +test_done -- cgit v1.2.3-70-g09d2