]> Cypherpunks.ru repositories - goredo.git/blob - t/goredo-chmoding.t
Download link for 2.6.2 release
[goredo.git] / t / goredo-chmoding.t
1 #!/bin/sh
2
3 testname=`basename "$0"`
4 test_description="Check that non-renamed target copies mode from temporary target"
5 . $SHARNESS_TEST_SRCDIR/sharness.sh
6 export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
7
8 echo echo ok > foo.do
9 redo foo
10 test_expect_success "foo is non executable" '[ ! -x foo ]'
11 inode0=`perl -e '@s=stat "foo"; print "$s[1]\n"'`
12
13 cat > foo.do <<EOF
14 echo ok > \$3
15 chmod +x \$3
16 EOF
17 redo foo
18 test_expect_success "foo is executable" '[ -x foo ]'
19 inode1=`perl -e '@s=stat "foo"; print "$s[1]\n"'`
20 test_expect_success "foo was not renamed" '[ $inode0 = $inode1 ]'
21
22 test_done