findutils-patches
[Top][All Lists]
Advanced

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

[Findutils-patches] Re: [PATCH 1/4] Add a test which checks $CWD for fin


From: Eric Blake
Subject: [Findutils-patches] Re: [PATCH 1/4] Add a test which checks $CWD for find -execdir {} + and ... {} ;
Date: Mon, 12 Apr 2010 09:56:13 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4

On 04/10/2010 02:33 PM, James Youngman wrote:
> * find/testsuite/find.gnu/execdir-multiple.exp: New test; verifies
> that for -execdir +, all the execs occur with the correct workikng

s/workikng/working/

> directory.
> * find/testsuite/find.gnu/execdir-multiple.xo: Expected output for
> this test.
> * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test.
> (EXTRA_DIST_XO): Add the expected output file.
> * find/testsuite/config/unix.exp (mkdir): Create proc "mkdir"
> which creates a directory.
> * find/testsuite/find.gnu/execdir-pwd1.exp: New test.
> * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
> execdir-pwd1.exp.

> +++ b/find/testsuite/config/unix.exp
> @@ -2,7 +2,7 @@
>  # Test-specific TCL procedures required by DejaGNU.
>  # Copyright (C) 2000, 2003, 2004, 2005, 2006,
>  #               2010 Free Software Foundation, Inc.
> -# 
> +#

If you haven't pushed already, it might be nice to separate whitespace
cleanup into its own commit.

>  
> +proc mkdir { dirname } {
> +    # Not all versions of Tcl offer 'file mkdir'.
> +    set failed [ catch "file mkdir $dirname" result ]
> +    if $failed {
> +     # Fall back on the external command.
> +     send_log "file mkdir does not work, falling back on exec mkdir\n"
> +     exec mkdir "$dirname"

Do you want functionality more like 'mkdir -p', which is tolerant of the
directory already existing, or do you want the error in that case?

> +++ b/find/testsuite/find.gnu/execdir-multiple.exp
> @@ -0,0 +1,55 @@
> +# tests for -execdir ... \+
> +
> +# Create 4 empty files in each of 6 directories.
> +# Also create a shell script in each of those 6 directories.
> +# Run a find command which runs the shell script for each empty file.
> +# Check to make sure that each file is mentioned exacly once, and that

s/exacly/exactly/

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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