Debian Codegraph @

tests/000_test_basic.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/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=$(mktempscip-shell system . . mktemp. -d )
9
10 cd ${TESTDIR}
11 mkdirscip-shell system . . mkdir. 1/
12
13 # make a few files for testing.
14 touchscip-shell system . . touch. 1/a 1/b 1/c 1/d
15 ddscip-shell system . . dd. if=/dev/zeroscip-shell filesystem . . `/dev/zero`. of=1/e bs=512 count=2
16
17 lsscip-shell system . . ls. -li 1/ > ls.prev
18
19 sleepscip-shell system . . sleep. 1s
20
21 cpscip-shell system . . cp. -al 1/ 2
22
23 echoscip-shell system . . echo. " 2/ before"
24 lsscip-shell system . . ls. -li 2/
25 echoscip-shell system . . echo. "cd 2 && echo a > a && mv b c && touch c && dd if=e of=d" | cow-shell
26 echoscip-shell system . . echo. " 2/ after"
27 lsscip-shell system . . ls. -li 2/
28
29 rmscip-shell system . . rm. -rf 2/
30
31 lsscip-shell system . . ls. -li 1/ > ls.after
32
33
34 echoscip-shell system . . echo. " 1/ differences; should not exist"
35 diffscip-shell system . . diff. -u ls.prev ls.after
36
37 rmscip-shell system . . rm. -rf ${TESTDIR}