[PATCH v3 0/3] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS

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

 



This v3 addresses SZEDER's note in <20210802171429.GC23408@xxxxxxxxxx>
that we were missing redirection. The "is_git_command_name" check has
also been moved one commit earlier, as it should.

Ævar Arnfjörð Bjarmason (3):
  test-lib-functions.sh: rename test_must_fail_acceptable()
  test-lib-functions.sh: add a test_with_columns function
  test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS

 pager.c                       |  7 +++++++
 t/t3200-branch.sh             |  8 ++++----
 t/t4052-stat-output.sh        | 22 +++++++++++-----------
 t/t4205-log-pretty-formats.sh |  6 +++---
 t/t7004-tag.sh                |  6 +++---
 t/t7006-pager.sh              |  2 +-
 t/t7508-status.sh             |  4 ++--
 t/t9002-column.sh             | 23 ++++++++++-------------
 t/test-lib-functions.sh       | 21 ++++++++++++++++++---
 t/test-lib.sh                 | 13 +++++++++++--
 10 files changed, 70 insertions(+), 42 deletions(-)

Range-diff against v2:
1:  739457b992f = 1:  f45590a76d5 test-lib-functions.sh: rename test_must_fail_acceptable()
2:  36c57178c55 ! 2:  53e6e25ece6 test-lib-functions.sh: add a test_with_columns function
    @@ t/test-lib-functions.sh: test_region () {
     +	local columns=$1
     +	shift
     +
    -+	COLUMNS=$columns "$@"
    -+}
    ++	if ! is_git_command_name "$@"
    ++	then
    ++		echo >&7 "test_with_columns: only 'git' is allowed: $*"
    ++		return 1
    ++	fi
    ++
    ++	COLUMNS=$columns "$@" 2>&7
    ++} 7>&2 2>&4
3:  6cbbb955e9a ! 3:  74acba0f9ca test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS
    @@ pager.c: int term_columns(void)
     
      ## t/test-lib-functions.sh ##
     @@ t/test-lib-functions.sh: test_with_columns () {
    - 	local columns=$1
    - 	shift
    + 		return 1
    + 	fi
      
    -+	if ! is_git_command_name "$@"
    -+	then
    -+		echo >&7 "test_with_columns: only 'git' is allowed: $*"
    -+		return 1
    -+	fi
    -+
     +	GIT_TEST_COLUMNS= \
    - 	COLUMNS=$columns "$@"
    - }
    + 	COLUMNS=$columns "$@" 2>&7
    + } 7>&2 2>&4
     
      ## t/test-lib.sh ##
     @@ t/test-lib.sh: LANG=C
-- 
2.33.0.rc0.597.gc569a812f0a




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux