]> Cypherpunks.ru repositories - goredo.git/blob - t/goredo-rel-ifcreate.t
Download link for 2.6.2 release
[goredo.git] / t / goredo-rel-ifcreate.t
1 #!/bin/sh
2
3 testname=`basename "$0"`
4 test_description="Proper relative to DirPrefix ifcreate paths"
5 . $SHARNESS_TEST_SRCDIR/sharness.sh
6 export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
7
8 mkdir -p a/b/c a/c
9 echo whatever > a/b/c/dep
10 cat > a/b/default.do <<EOF
11 echo called \$1
12 redo-ifcreate ../c/dep
13 redo-ifchange c/dep
14 EOF
15 redo-ifchange a/b/c/file
16 stat1=`stat a/b/c/file`
17 redo-ifchange a/b/c/file
18 stat2=`stat a/b/c/file`
19
20 test_expect_success "file stays same" '[ "$stat1" = "$stat2" ]'
21
22 touch a/c/dep
23 redo-ifchange a/b/c/file
24 stat3=`stat a/b/c/file`
25
26 test_expect_success "ifcreate target works" '[ "$stat1" != "$stat3" ]'
27
28 test_done