Debian Codegraph @

tests/004_test_fopen64.sh

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