Debian Codegraph @

tests/002_test_open.sh

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