From 7260c37aa8c91c8008dcd2442a19c23d1c9040fb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 20 May 2024 07:14:39 +0200 Subject: Merging upstream version 1:2.45.1. Signed-off-by: Daniel Baumann --- t/t9400-git-cvsserver-server.sh | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 't/t9400-git-cvsserver-server.sh') diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 003c0b6..e499c7f 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -117,12 +117,12 @@ END VERIFICATION REQUEST EOF test_expect_success 'pserver authentication' ' - cat request-anonymous | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication failure (non-anonymous user)' ' - if cat request-git | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then false else @@ -132,17 +132,17 @@ test_expect_success 'pserver authentication failure (non-anonymous user)' ' ' test_expect_success 'pserver authentication success (non-anonymous user with password)' ' - cat login-git-ok | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication (login)' ' - cat login-anonymous | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication failure (login/non-anonymous user)' ' - if cat login-git | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then false else @@ -172,7 +172,7 @@ Root $WORKDIR EOF test_expect_success 'req_Root failure (relative pathname)' ' - if cat request-relative | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then echo unexpected success false @@ -183,28 +183,26 @@ test_expect_success 'req_Root failure (relative pathname)' ' ' test_expect_success 'req_Root failure (conflicting roots)' ' - cat request-conflict | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && tail log | grep "^error 1 Conflicting roots specified$" ' test_expect_success 'req_Root (strict paths)' ' - cat request-anonymous | git-cvsserver --strict-paths pserver "$SERVERDIR" >log 2>&1 && + git-cvsserver --strict-paths pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (strict-paths)' ' - ! cat request-anonymous | - git-cvsserver --strict-paths pserver "$WORKDIR" >log 2>&1 + ! git-cvsserver --strict-paths pserver "$WORKDIR" log 2>&1 ' test_expect_success 'req_Root (w/o strict-paths)' ' - cat request-anonymous | git-cvsserver pserver "$WORKDIR/" >log 2>&1 && + git-cvsserver pserver "$WORKDIR/" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (w/o strict-paths)' ' - ! cat request-anonymous | - git-cvsserver pserver "$WORKDIR/gitcvs" >log 2>&1 + ! git-cvsserver pserver "$WORKDIR/gitcvs" log 2>&1 ' cat >request-base <log 2>&1 && + git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (base-path)' ' - ! cat request-anonymous | - git-cvsserver --strict-paths --base-path "$WORKDIR" pserver "$SERVERDIR" >log 2>&1 + ! git-cvsserver --strict-paths --base-path "$WORKDIR" pserver "$SERVERDIR" log 2>&1 ' GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1 test_expect_success 'req_Root (export-all)' ' - cat request-anonymous | git-cvsserver --export-all pserver "$WORKDIR" >log 2>&1 && + git-cvsserver --export-all pserver "$WORKDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (export-all w/o directory list)' ' - ! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)' + ! (git-cvsserver --export-all pserver log 2>&1 || false)' test_expect_success 'req_Root (everything together)' ' - cat request-base | git-cvsserver --export-all --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 && + git-cvsserver --export-all --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' -- cgit v1.2.3