Skip to content

Commit e1055f3

Browse files
committed
t7527: test builtin FSMonitor watching repos with unicode paths
Create some test repos with UTF8 pathnames 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 <[email protected]>
1 parent 67a44fb commit e1055f3

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
@@ -690,4 +690,27 @@ do
690690
done
691691
done
692692

693+
# Test Unicode UTF-8 characters in the pathname of the working
694+
# directory. Use of "*A()" routines rather than "*W()" routines
695+
# on Windows can sometimes lead to odd failures.
696+
#
697+
u1=$(printf "u_c3_a6__\xC3\xA6")
698+
u2=$(printf "u_e2_99_ab__\xE2\x99\xAB")
699+
u_values="$u1 $u2"
700+
for u in $u_values
701+
do
702+
test_expect_success "Unicode path: $u" '
703+
test_when_finished "stop_daemon_delete_repo $u" &&
704+
705+
git init "$u" &&
706+
echo 1 >"$u"/file1 &&
707+
git -C "$u" add file1 &&
708+
git -C "$u" config core.useBuiltinFSMonitor true &&
709+
710+
start_daemon "$u" &&
711+
git -C "$u" status >actual &&
712+
grep "new file: file1" actual
713+
'
714+
done
715+
693716
test_done

0 commit comments

Comments
 (0)