commit 8682db42e0ef4ce144b7c6f934125877c33e5602 from: Lucas via: Thomas Adam date: Tue Feb 07 20:14:55 2023 UTC add xfail test for 'got status' ignore patterns with a trailing slash Patch by Lucas commit - e012cf94a2ba4c30e3b5842aacd715b5f5e420f9 commit + 8682db42e0ef4ce144b7c6f934125877c33e5602 blob - f300dcfe4401545c0f39a9579a7a85f13abf3aba blob + 09c72780441f3d8fdb30fa70928342a4b2f10756 --- regress/cmdline/status.sh +++ regress/cmdline/status.sh @@ -695,6 +695,36 @@ EOF test_done "$testroot" "$ret" } +test_status_gitignore_trailing_slashes() { + local testroot=`test_init status_gitignore_trailing_slashes` + + got checkout $testroot/repo $testroot/wt > /dev/null + ret=$? + if [ $ret -ne 0 ]; then + test_done "$testroot" "$ret" + return 1 + fi + + echo "unversioned file" > $testroot/wt/foo + echo "unversioned file" > $testroot/wt/epsilon/bar + echo "unversioned file" > $testroot/wt/epsilon/boo + echo "unversioned file" > $testroot/wt/epsilon/moo + echo "epsilon/" > $testroot/wt/.gitignore + + echo '? .gitignore' > $testroot/stdout.expected + echo '? foo' >> $testroot/stdout.expected + (cd $testroot/wt && got status > $testroot/stdout) + + cmp -s $testroot/stdout.expected $testroot/stdout + ret=$? + if [ $ret -ne 0 ]; then + diff -u $testroot/stdout.expected $testroot/stdout + test_done "$testroot" "xfail trailing slashes" + return 1 + fi + test_done "$testroot" "$ret" +} + test_status_status_code() { local testroot=`test_init status_status_code` @@ -1044,6 +1074,7 @@ run_test test_status_empty_dir_unversioned_file run_test test_status_many_paths run_test test_status_cvsignore run_test test_status_gitignore +run_test test_status_gitignore_trailing_slashes run_test test_status_status_code run_test test_status_suppress run_test test_status_empty_file