git: sh: Detect an error for ${#var<GARBAGE>}.

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Aug 21 16:33:05 PDT 2011


commit f41d807a0c7c535d8f66f0593fb6e95fa20f82d4
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sat Jul 2 14:03:42 2011 -1000

    sh: Detect an error for ${#var<GARBAGE>}.
    
    In particular, this makes things like ${#foo[0]} and ${#foo[@]} errors
    rather than silent equivalents of ${#foo}.
    
    Obtained-from:   FreeBSD SVN rev 221461

Summary of changes:
 bin/sh/parser.c                                    |    4 +++-
 tools/regression/bin/sh/errors/bad-parm-exp6.2     |    2 ++
 .../bin/sh/errors/bad-parm-exp6.2.stderr           |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
 create mode 100644 tools/regression/bin/sh/errors/bad-parm-exp6.2
 create mode 100644 tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f41d807a0c7c535d8f66f0593fb6e95fa20f82d4


-- 
DragonFly BSD source repository





More information about the Commits mailing list