[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glob(pattern)

From: Thorsten Meyer
Subject: Re: glob(pattern)
Date: Wed, 17 Feb 2010 22:03:42 +0100
User-agent: Mozilla-Thunderbird (X11/20090706)

John W. Eaton wrote:
> On 16-Feb-2010, Ben Abbott wrote:
> | On Feb 16, 2010, at 1:00 AM, Aditya Bhagwat wrote:
> |
> | > Dear Ben,
> | >
> | >> Did you try  ...
> | >>
> | >>    glob ('.*')
> | >>
> | >> Ben
> | >
> | > Yep, I did. In fact, that's what isn't working (or not the "regexp"-way I
> | > would expect it to).
> The glob function uses filename globbing rules, not regexp rules.
> Yes, the documentation should explain what "filename globbing rules"
> are.  The "Pattern Matching" section of the bash manual has an
> explanation.  Would someone please adapt that (or another suitable)
> description and post a patch for the glob docstring?

Here is a patch to document filename globbing rules. It also contains a test for
the glob function.
I don't like that test yet: when the asserts fail, the cleanup section will not
be executed and afterwards the working directory or the octave session will be
the temporary directory of the test (I tried with a dummy assert (1, 2)).
I tried to use an unwind_protect block but that does not seem to work within a 
Yet for the test itself to be robust, I need a clean directory to start with.

Is there another way to provide a robust cleanup for a test?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]