| •1 |
#!/usr/bin/bashscip-shell filesystem . . `/usr/bin/bash`. |
| 2 |
|
| 3 |
. ../template/path-init.shscip-shell source . . `../template/path-init.sh`. |
| 4 |
|
| 5 |
rmscip-shell system . . rm. -rf _test |
| 6 |
mkdirscip-shell system . . mkdir. _test |
| 7 |
findscip-shell system . . find. . -maxdepth 1 -not -name . -not -name _test -exec cp -r '{}' -t _test ';' |
| 8 |
|
| 9 |
cd _test || exit 1 |
| 10 |
|
| 11 |
# includes 6 file extensions, ignores others such as .c, .vo |
| 12 |
# recursive expansion |
| 13 |
# explicit non-existent file included |
| 14 |
actual=`rocq makefile -sources-of -o CoqMakefile . nonexistent.v` |
| 15 |
expected="a/b/g.v a/g.mlg a/g.mllib a/g.mlpack g.ml g.mli nonexistent.v" |
| 16 |
if [scip-shell system . . `[`. "$actual" != "$expected" ]; then |
| 17 |
echoscip-shell system . . echo. actual: $actual |
| 18 |
echoscip-shell system . . echo. expected: $expected |
| 19 |
exit 1 |
| 20 |
fi |
| 21 |
|
| 22 |
# expands specific directory, not ., gets the right subset |
| 23 |
actual=`rocq makefile -sources-of -o CoqMakefile a` |
| 24 |
expected="a/b/g.v a/g.mlg a/g.mllib a/g.mlpack" |
| 25 |
if [scip-shell system . . `[`. "$actual" != "$expected" ]; then |
| 26 |
echoscip-shell system . . echo. actual: $actual |
| 27 |
echoscip-shell system . . echo. expected: $expected |
| 28 |
exit 1 |
| 29 |
fi |
| 30 |
|
| 31 |
# command line args are in Makefile.conf |
| 32 |
rocq makefile -o CoqMakefile . x |
| 33 |
actual=`grepscip-shell system . . grep. "COQMF_CMDLINE_VFILES := . x" CoqMakefile.conf` |
| 34 |
if testscip-shell system . . test. $? -ne 0; then |
| 35 |
echoscip-shell system . . echo. bad COQMF_CMDLINE_VFILES: |
| 36 |
grepscip-shell system . . grep. "COQMF_CMDLINE_VFILES" CoqMakefile.conf |
| 37 |
exit 1 |
| 38 |
fi |