Skip to content
  • Ramkumar Ramachandra's avatar
    t3040 (subprojects-basic): fix '&&' chaining, modernize style · 5e113622
    Ramkumar Ramachandra authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Breaks in a test assertion's && chain can potentially hide failures
    from earlier commands in the chain.  Fix instances of this.  While at
    it, clean up the style to fit the prevailing style.  This means:
    
    - Put the opening quote starting each test on the same line as the
      test_expect_* invocation.
    
    - Indent the file with tabs, not spaces.
    
    - Use test_expect_code() in preference to checking the exit status of
      various statements by hand.
    
    - Guard commands that prepare test input for individual tests in the
      same test_expect_success, so that their scope is clearer and errors
      at that stage can be caught.
    
    - Use <<-\EOF in preference to <<EOF to save readers the trouble of
      looking for variable interpolations.
    
    - Include "setup" in the titles of test assertions that prepare for
      later ones to make it more obvious which tests can be skipped.
    
    Helped-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarRamkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    5e113622