Debian Codegraph @

tests/000_test_basic.sh

raw symbols SCIP
1 #!/bin/bash
2 # test that things are working as expected.
3 #
4 # Requires a installed cowdancer, and will test the installed cowdancer.
5
6 set -ex
7
8 TESTDIR=$(mktemp -d )
9
10 cd ${TESTDIR}
11 mkdir 1/
12
13 # make a few files for testing.
14 touch 1/a 1/b 1/c 1/d
15 dd if=/dev/zero of=1/e bs=512 count=2
16
17 ls -li 1/ > ls.prev
18
19 sleep 1s
20
21 cp -al 1/ 2
22
23 echo " 2/ before"
24 ls -li 2/
25 echo "cd 2 && echo a > a && mv b c && touch c && dd if=e of=d" | cow-shell
26 echo " 2/ after"
27 ls -li 2/
28
29 rm -rf 2/
30
31 ls -li 1/ > ls.after
32
33
34 echo " 1/ differences; should not exist"
35 diff -u ls.prev ls.after
36
37 rm -rf ${TESTDIR}