Re: [pcre-dev] RunGrepTest comparison failure

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] RunGrepTest comparison failure
On 8/18/2012 12:25 PM, Philip Hazel wrote:
> On Thu, 12 Jul 2012, Sheri wrote:
>
>> Not sure which version I last tried this but when I previously built with
>> unix-like tools on Windows, RunGrepTest processed without issues.
>> ---------------------------- Test 35 -----------------------------
>> -./testdata/grepinputx
>> -RC=0
>> +RC=2
>> ---------------------------- Test 36 -----------------------------
>> -./testdata/grepinput3
>> -./testdata/grepinput8
>> -./testdata/grepinputx
>> RC=0
>> Can't open a directory as a file on Windows, but tests 35 and 36 both have the
>> "-r" option, so they shouldn't be attempting it?
> Sheri,
>
> Thanks, as always, for your testing. Indeed 35 and 36 shouldn't be
> trying to open a directory as a file. Have you had a chance to try the
> new version that was giving you trouble owing to my typos? One change in
> that version is to default "-d skip" for Windows, so that even without
> -r it shouldn't be trying to open a directory as a file.
>
> However, the test you did the other day seemed to indicate that it
> wasn't recognizing that it was in a Windows environment. In that case,
> it does not know how to test for a directory, and so it would try to
> open as a file. The test for a Windows environment is this:
>
> #if defined HAVE_WINDOWS_H&& HAVE_WINDOWS_H
>
> Maybe there's something wrong there???
>
> Philip
>


Yes, that revision does build (using Msys/minGW environment on Windows),
but (using 8.31 testdata and test scripts) still gives exceptions on
Tests 35 and 36. Test 36 result is unchanged but Test 35 now gives RC=1
instead of RC=2. I have not tried updated testdata and scripts.

I generally have gotten the most useful pcregrep builds with UNIX-like
Msys/minGW (which has dirent.h) instead of with VC6. Among other things,
when built with VC6, an asterisk in the filename on pcregrep's command
line hasn't worked. Also testing pcregrep is not part of what happens
for VC builds (no bat file equivalent to RunGrepTest). But I will try
building the updated pcregrep in VC6 in the next few days and report back.

Regards,
Sheri