Skip to content
  • Jeff King's avatar
    t9103: modernize test style · 2a86cb6d
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The main goal here was to avoid double-quotes for
    surrounding the test snippet, since it makes the code hard
    to read (and to grep for common problems).
    
    But while we're here, we can fix a few other things:
    
      - use test_path_* helpers, which are more robust and give
        better error messages
    
      - only "cd" inside a subshell, which leaves the
        environment pristine if further tests are added
    
      - consistently quote shell arguments. These aren't wrong
        if we assume find-rev output doesn't have any
        whitespace, but it doesn't hurt to be careful.
    
      - replace the old-style 'test x$foo = x' with 'test -z
        "$foo"'. Besides the quoting fix, this is the form we
        generally use in our test suite.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    2a86cb6d