Debian Codegraph @

tests/021_test_open.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # test close(0); open() pair will create FD=0
3 set -ex
4
5 TESTDIR=$(mktempscip-shell system . . mktemp. -d )
6 TESTCODE=$(readlinkscip-shell system . . readlink. -f tests/021_test_open.c)
7
8 cd "${TESTDIR}"
9 mkdirscip-shell system . . mkdir. 1/
10 # make a few files for testing.
11 touchscip-shell system . . touch. 1/a 1/b 1/c 1/d
12 lnscip-shell system . . ln. -s a 1/f
13 lnscip-shell system . . ln. -s b 1/g
14 cpscip-shell system . . cp. -al 1/ 2
15 # first, exclude non-cowdancer problem
16 021_test_open "${TESTCODE}"
17 #check that cowdancer works.
18 cow-shell 021_test_open "${TESTCODE}"
19 RET=$?
20 echoscip-shell system . . echo. $RET
21
22 rmscip-shell system . . rm. -rf ${TESTDIR}