X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=blobdiff_plain;f=t%2Fgoredo-chmoding.t;fp=t%2Fgoredo-chmoding.t;h=79866970b608c595c41b290a343e91da51f6ba22;hp=0000000000000000000000000000000000000000;hb=44a1f0561eb67b042295231ec1ea4eb738c45a0b;hpb=6dce71355599d4caf8267f6f02520037480f7ba3 diff --git a/t/goredo-chmoding.t b/t/goredo-chmoding.t new file mode 100755 index 0000000..7986697 --- /dev/null +++ b/t/goredo-chmoding.t @@ -0,0 +1,22 @@ +#!/bin/sh + +testname=`basename "$0"` +test_description="Check that non-renamed target copies mode from temporary target" +. $SHARNESS_TEST_SRCDIR/sharness.sh +export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1 + +echo echo ok > foo.do +redo foo +test_expect_success "foo is non executable" '[ ! -x foo ]' +inode0=`stat -f %i foo` + +cat > foo.do < \$3 +chmod +x \$3 +EOF +redo foo +test_expect_success "foo is executable" '[ -x foo ]' +inode1=`stat -f %i foo` +test_expect_success "foo was not renamed" '[ $inode0 = $inode1 ]' + +test_done