Merge branch 'th/difftool-diffall'
[gitweb.git] / t / t0300-credentials.sh
index c1c8108148351ab3ec3db3f2615ff88f29d38974..538ea5fb1c27bf5e4f9c4a0268f219f5d6d6e9c5 100755 (executable)
@@ -17,22 +17,18 @@ test_expect_success 'setup helper scripts' '
        IFS=$OIFS
        EOF
 
-       cat >git-credential-useless <<-\EOF &&
-       #!/bin/sh
+       write_script git-credential-useless <<-\EOF &&
        . ./dump
        exit 0
        EOF
-       chmod +x git-credential-useless &&
 
-       cat >git-credential-verbatim <<-\EOF &&
-       #!/bin/sh
+       write_script git-credential-verbatim <<-\EOF &&
        user=$1; shift
        pass=$1; shift
        . ./dump
        test -z "$user" || echo username=$user
        test -z "$pass" || echo password=$pass
        EOF
-       chmod +x git-credential-verbatim &&
 
        PATH="$PWD:$PATH"
 '
@@ -86,6 +82,9 @@ test_expect_success 'credential_fill passes along metadata' '
        host=example.com
        path=foo.git
        --
+       protocol=ftp
+       host=example.com
+       path=foo.git
        username=one
        password=two
        --
@@ -217,6 +216,8 @@ test_expect_success 'match configured credential' '
        host=example.com
        path=repo.git
        --
+       protocol=https
+       host=example.com
        username=foo
        password=bar
        --
@@ -229,6 +230,8 @@ test_expect_success 'do not match configured credential' '
        protocol=https
        host=bar
        --
+       protocol=https
+       host=bar
        username=askpass-username
        password=askpass-password
        --
@@ -243,6 +246,8 @@ test_expect_success 'pull username from config' '
        protocol=https
        host=example.com
        --
+       protocol=https
+       host=example.com
        username=foo
        password=askpass-password
        --
@@ -256,6 +261,8 @@ test_expect_success 'http paths can be part of context' '
        host=example.com
        path=foo.git
        --
+       protocol=https
+       host=example.com
        username=foo
        password=bar
        --
@@ -269,6 +276,9 @@ test_expect_success 'http paths can be part of context' '
        host=example.com
        path=foo.git
        --
+       protocol=https
+       host=example.com
+       path=foo.git
        username=foo
        password=bar
        --