]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0300-credentials.sh
credential: detect unrepresentable values when parsing urls
[thirdparty/git.git] / t / t0300-credentials.sh
index 15cc3c5abb5b107f851ef2029092ca7a7d758507..3bec445cacf0573798aa2eeda222bb298596b661 100755 (executable)
@@ -309,9 +309,17 @@ test_expect_success 'empty helper spec resets helper list' '
        EOF
 '
 
-test_expect_success 'url parser rejects embedded newlines' '
-       test_must_fail git credential fill <<-\EOF
+test_expect_success 'url parser ignores embedded newlines' '
+       check fill <<-EOF
        url=https://one.example.com?%0ahost=two.example.com/
+       --
+       username=askpass-username
+       password=askpass-password
+       --
+       warning: url contains a newline in its host component: https://one.example.com?%0ahost=two.example.com/
+       warning: skipping credential lookup for url: https://one.example.com?%0ahost=two.example.com/
+       askpass: Username:
+       askpass: Password:
        EOF
 '