sha1-file.c: mark more strings for translation
[gitweb.git] / t / t5570-git-daemon.sh
index b556469db6583d96fcb4642acbf100628b5b2374..a571f22bfdd52293d0fcce16d30870119f72e88f 100755 (executable)
@@ -7,9 +7,9 @@ test_description='test fetching over git protocol'
 start_git_daemon
 
 check_verbose_connect () {
-       grep -F "Looking up 127.0.0.1 ..." stderr &&
-       grep -F "Connecting to 127.0.0.1 (port " stderr &&
-       grep -F "done." stderr
+       test_i18ngrep -F "Looking up 127.0.0.1 ..." stderr &&
+       test_i18ngrep -F "Connecting to 127.0.0.1 (port " stderr &&
+       test_i18ngrep -F "done." stderr
 }
 
 test_expect_success 'setup repository' '
@@ -50,7 +50,7 @@ test_expect_success 'no-op fetch -v stderr is as expected' '
 '
 
 test_expect_success 'no-op fetch without "-v" is quiet' '
-       (cd clone && git fetch) 2>stderr &&
+       (cd clone && git fetch 2>../stderr) &&
        ! test -s stderr
 '
 
@@ -196,5 +196,20 @@ test_expect_success 'daemon log records all attributes' '
        test_cmp expect actual
 '
 
+test_expect_success FAKENC 'hostname interpolation works after LF-stripping' '
+       {
+               printf "git-upload-pack /interp.git\n\0host=localhost" | packetize
+               printf "0000"
+       } >input &&
+       fake_nc "$GIT_DAEMON_HOST_PORT" <input >output &&
+       depacketize <output >output.raw &&
+
+       # just pick out the value of master, which avoids any protocol
+       # particulars
+       perl -lne "print \$1 if m{^(\\S+) refs/heads/master}" <output.raw >actual &&
+       git -C "$repo" rev-parse master >expect &&
+       test_cmp expect actual
+'
+
 stop_git_daemon
 test_done