Greetings Ted,

If you copy the attached files to .../test/ then it should fix the 
problem with t_htdig, and the spurious warnings for t_factors.  The 
other two seem to suggest that HP-UX doesn't like 8-bit characters.  
Do you know if that is the case?

Cheers,
Lachlan

On Thu, 3 Jun 2004 09:38 pm, Ted Stresen-Reuter wrote:
> I did now...
>
> tedsr% make check
> running htdig: expected
> http://localhost:7400/set1/
 [delete]
> but got
>
> FAIL: t_htdig
> awk: empty regular expression
>   input record number 61, file
>   source line number 1
> PASS: t_factors
> Output doesn't match "1 matches"
> ../htsearch/htsearch -c
> /Users/tedsr/Desktop/htdig-3.2.0b6/test/conf/htdig.conf.tmp
> 'words=francais;search_algorithm=accents:0.1' >>
> /tmp/t_htsearch24106 --
>                    Search for 'francais' with
> search_algorithm=accents
> FAIL: t_fuzzy
> Output doesn't match "1 matches"
> ../htsearch/htsearch -c
> /Users/tedsr/Desktop/htdig-3.2.0b6/test/conf/htdig.conf.tmp
> 'words=fran?ais' >> /tmp/t_htsearch25328 --
>                    Search for 'fran?ais' without translate_latin1
> FAIL: t_validwords
> ====================
> 3 of 19 tests failed
> ====================

-- 
[EMAIL PROTECTED]
ht://Dig developer DownUnder  (http://www.htdig.org)

Attachment: t_factors
Description: application/shellscript

#
# Part of the ht://Dig package   <http://www.htdig.org/>
# Copyright (c) 1999-2004 The ht://Dig Group
# For copyright details, see the file COPYING in your distribution
# or the GNU Library General Public License (LGPL) version 2 or later
# <http://www.gnu.org/copyleft/lgpl.html>
#
# $Id: t_htdig,v 1.15 2004/05/28 13:15:30 lha Exp $
#

# Tests the following config attributes:
#       case_sensitive
#       common_url_parts
#       limit_urls_to
#       robotstxt_name
#       url_part_aliases
#       url_rewrite_rules

flags="$@"

try() {
    config=$1
    expected=$2

#    $htdig "$flags" -t -i -c $config   # crashes on Solaris, HP-UX -- lha
    $htdig $flags -t -i -c $config
    # One test gives empty database -- suppress this warning.
    $htpurge -c $config 2&> /dev/null

        # only used when  url_part_aliases  was set before the call...
    set_attr url_part_aliases "bar foo"

    got=`./document -c $config -u | sort`

    if [ "$expected" != "$got" ]
    then
            fail "running htdig: expected 
$expected
but got
$got"

    fi
}

test_functions_action=--start-apache
. ./test_functions

conf=$testdir/conf/htdig.conf.tmp
cp $testdir/conf/htdig.conf $conf

# complete dig of set 1

try $conf \
'http://localhost:7400/set1/
http://localhost:7400/set1/bad_local.htm
http://localhost:7400/set1/script.html
http://localhost:7400/set1/site%201.html
http://localhost:7400/set1/site2.html
http://localhost:7400/set1/site3.html
http://localhost:7400/set1/site4.html
http://localhost:7400/set1/sub%2520dir/
http://localhost:7400/set1/sub%2520dir/empty%20file.html
http://localhost:7400/set1/title.html'


# Check  common_url_parts  being encoded properly
set_attr common_url_parts "dummy1 dummy2 dummy3 dummy4 dummy5 dummy6 dummy7 dummy8 
dummy9 dummy10 dummy11 dummy12"
got=`./document -c $config -u | sort`
expected='dummy1localhost:7400/set1/
dummy1localhost:7400/set1/bad_localdummy7
dummy1localhost:7400/set1/scriptdummy6
dummy1localhost:7400/set1/site%201dummy6
dummy1localhost:7400/set1/site2dummy6
dummy1localhost:7400/set1/site3dummy6
dummy1localhost:7400/set1/site4dummy6
dummy1localhost:7400/set1/sub%2520dir/
dummy1localhost:7400/set1/sub%2520dir/empty%20filedummy6
dummy1localhost:7400/set1/titledummy6'
if [ "$expected" != "$got" ]
then
    fail "running htdig: expected 
$expected
but got
$got"
fi


# Pretend we are another user; robots.txt bans us from seeing 'site*'

set_attr robotstxt_name other
# (Reverse mapping from 'foo' to 'bar' implemented in  try.)
set_attr url_part_aliases "http://localhost:7400/set1 foo"

try $conf \
'bar/
bar/bad_local.htm
bar/script.html
bar/sub%2520dir/
bar/sub%2520dir/empty%20file.html
bar/title.html'

# back to default.
set_attr url_part_aliases

# check  limit_urls_to  obeys case sensitive
set_attr start_url HTTP://LocalHost:7400/Set1/
try $conf ""

set_attr case_sensitive false
set_attr robotstxt_name htdig
# common_url_parts is case sensitive, despite  case_sensitive=false
set_attr common_url_parts "http:// http://local HTTP://LocalHost 7400/set1"
# Replace site4.html by a file:/// URL.  Must explicitly add leading chars
set_attr url_rewrite_rules '(.*)si[a-z]*[4-9]*\.([a-z]*)tml 
file:///'$PWD'/htdocs/set1/site4.\\2tml'
set_attr limit_urls_to '${start_url} site4.html'

try $conf \
'file://'$PWD'/htdocs/set1/site4.html
http://localhost:7400/set1/
http://localhost:7400/set1/bad_local.htm
http://localhost:7400/set1/script.html
http://localhost:7400/set1/site%201.html
http://localhost:7400/set1/site2.html
http://localhost:7400/set1/site3.html
http://localhost:7400/set1/sub%2520dir/
http://localhost:7400/set1/sub%2520dir/empty%20file.html
http://localhost:7400/set1/title.html'

# Check  common_url_parts  being encoded properly
set_attr common_url_parts "dummy1 dummy2 dummy3 dummy4"
got=`./document -c $config -u | sort`
expected='dummy2host:dummy4/
dummy2host:dummy4/bad_local.htm
dummy2host:dummy4/script.html
dummy2host:dummy4/site%201.html
dummy2host:dummy4/site2.html
dummy2host:dummy4/site3.html
dummy2host:dummy4/sub%2520dir/
dummy2host:dummy4/sub%2520dir/empty%20file.html
dummy2host:dummy4/title.html
file://'$PWD'/htdocs/set1/site4.html'
if [ "$expected" != "$got" ]
then
    fail "running htdig: expected 
$expected
but got
$got"
fi

test_functions_action=--stop-apache
. ./test_functions

Reply via email to