| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # test ilist dumping, and content check. |
| 3 | set -ex |
| 4 | |
| 5 | TESTDIR=$(mktempscip-shell system . . mktemp. -d ) |
| 6 | TESTCODE=$(readlinkscip-shell system . . readlink. -f cowdancer-ilistdump) |
| 7 | |
| 8 | ( |
| 9 | cd ${TESTDIR} |
| 10 | mkdirscip-shell system . . mkdir. 1/ |
| 11 | # make a few files for testing. |
| 12 | touchscip-shell system . . touch. 1/a 1/b 1/c 1/d |
| 13 | lnscip-shell system . . ln. 1/a 1/aa |
| 14 | lnscip-shell system . . ln. 1/b 1/bb |
| 15 | cpscip-shell system . . cp. -al 1 2 |
| 16 | |
| 17 | ddscip-shell system . . dd. if=/dev/zeroscip-shell filesystem . . `/dev/zero`. of=1/e bs=512 count=2 |
| 18 | |
| 19 | cd 1 |
| 20 | findscip-shell system . . find. -links +1 -type f -printf "%D %i\n" | sortscip-shell system . . sort. -k 2 -n > ../mylist.1 |
| 21 | cow-shell "${TESTCODE}" ${TESTDIR}/1/.ilist | sortscip-shell system . . sort. -k 2 -n > ${TESTDIR}/mylist.2 |
| 22 | ) |
| 23 | RET=$? |
| 24 | |
| 25 | diffscip-shell system . . diff. -u ${TESTDIR}/mylist.1 ${TESTDIR}/mylist.2 |
| 26 | |
| 27 | rmscip-shell system . . rm. -rf ${TESTDIR} |
| 28 | exit $RET |