Skip to content

Commit a1931de

Browse files
jeffhostetlergitster
authored andcommitted
t7527: test FSMonitor on repos with Unicode root paths
Create some test repos with UTF8 characters in the pathname of the root directory and verify that the builtin FSMonitor can watch them. This test is mainly for Windows where we need to avoid `*A()` routines. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ddfa8c5 commit a1931de

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

t/t7527-builtin-fsmonitor.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,4 +671,27 @@ do
671671
done
672672
done
673673

674+
# Test Unicode UTF-8 characters in the pathname of the working
675+
# directory root. Use of "*A()" routines rather than "*W()" routines
676+
# on Windows can sometimes lead to odd failures.
677+
#
678+
u1=$(printf "u_c3_a6__\xC3\xA6")
679+
u2=$(printf "u_e2_99_ab__\xE2\x99\xAB")
680+
u_values="$u1 $u2"
681+
for u in $u_values
682+
do
683+
test_expect_success "Unicode in repo root path: $u" '
684+
test_when_finished "stop_daemon_delete_repo $u" &&
685+
686+
git init "$u" &&
687+
echo 1 >"$u"/file1 &&
688+
git -C "$u" add file1 &&
689+
git -C "$u" config core.fsmonitor true &&
690+
691+
start_daemon -C "$u" &&
692+
git -C "$u" status >actual &&
693+
grep "new file: file1" actual
694+
'
695+
done
696+
674697
test_done

0 commit comments

Comments
 (0)