Debian Codegraph @

tests/empty-file

raw
1 #!/bin/sh
2 # Test empty files
3
4 . "${srcdir=.}/init.sh"; path_prepend_ ../src
5
6 fail=0
7 mkdir a b
8 touch a/test
9 echo 'content' > b/test
10
11 returns_ 1 diff -Naur a b >out || fail=1
12 cat <<EOF > expected || framework_failure_
13 diff -Naur a/test b/test
14 --- a/test
15 +++ b/test
16 @@ -0,0 +1 @@
17 +content
18 EOF
19 # Remove date and time.
20 sed -e 's/^\([-+*][-+*][-+*] [^ ]*\) .*/\1/' out > k; mv k out
21 compare expected out || fail=1
22
23 Exit $fail