diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 037de004c68d704abf839eebe075c58c9603f8f3 (patch) | |
tree | 7ac13a7fbb70193e7d04fc193f75de839e914d45 /t/t9400-git-cvsserver-server.sh | |
parent | Adding upstream version 1:2.43.0. (diff) | |
download | git-037de004c68d704abf839eebe075c58c9603f8f3.tar.xz git-037de004c68d704abf839eebe075c58c9603f8f3.zip |
Adding upstream version 1:2.45.1.upstream/1%2.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t9400-git-cvsserver-server.sh')
-rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 35 |
1 files changed, 16 insertions, 19 deletions
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 <request-anonymous >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 <request-git >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 <login-git-ok >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 <login-anonymous >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 <login-git >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 <request-relative >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 <request-conflict >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" <request-anonymous >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" <request-anonymous >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/" <request-anonymous >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" <request-anonymous >log 2>&1 ' cat >request-base <<EOF @@ -217,27 +215,26 @@ Root /gitcvs.git EOF test_expect_success 'req_Root (base-path)' ' - cat request-base | git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 && + git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" <request-base >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" <request-anonymous >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" <request-anonymous >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 <request-anonymous >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" <request-base >log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' |