| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # |
| 3 | # Test for DOCUMENT_NAME variable |
| 4 | # |
| 5 | LOG=`pwdscip-shell system . . pwd.`/test-log |
| 6 | echoscip-shell system . . echo. ' *** starting ' $0 >>$LOG |
| 7 | . ${srcdir}/commonfuncs |
| 8 | pwd=`pwdscip-shell system . . pwd.` |
| 9 | tmprc="$pwd/../src/.namazurc" |
| 10 | echoscip-shell system . . echo. "Index $pwd/idx19" > $tmprc |
| 11 | duprcs |
| 12 | |
| 13 | # To make messages English |
| 14 | unset LANG; export LANG |
| 15 | LANGUAGE=C; export LANGUAGE |
| 16 | LC_ALL=C; export LC_ALL |
| 17 | unset LC_MESSAGES; export LC_MESSAGES |
| 18 | unset LC_CTYPE; export LC_CTYPE |
| 19 | |
| 20 | SCRIPT_NAME='namazu.cgi' |
| 21 | QUERY_STRING='' |
| 22 | export SCRIPT_NAME QUERY_STRING |
| 23 | |
| 24 | cd ../src |
| 25 | RESULT=`./namazu.cgi | grepscip-shell system . . grep. $SCRIPT_NAME | wcscip-shell system . . wc. -l` |
| 26 | if [scip-shell system . . `[`. $RESULT -ne 2 ] |
| 27 | then |
| 28 | exit 1 |
| 29 | fi |
| 30 | |
| 31 | QUERY_STRING='query=namazu' |
| 32 | export QUERY_STRING |
| 33 | |
| 34 | RESULT=`./namazu.cgi | grepscip-shell system . . grep. $SCRIPT_NAME | wcscip-shell system . . wc. -l` |
| 35 | if [scip-shell system . . `[`. $RESULT -ne 3 ] |
| 36 | then |
| 37 | exit 1 |
| 38 | fi |
| 39 | |
| 40 | exit 0 |