Skip to content

Commit 109ad07

Browse files
jeffhostetlerdscho
authored andcommitted
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 cb3b332 commit 109ad07

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
@@ -699,4 +699,27 @@ do
699699
done
700700
done
701701

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

0 commit comments

Comments
 (0)