commit 94d1a66aaad059d61f5a244f4ffbe0607ae52d59 from: Stefan Sperling via: Thomas Adam date: Sun Jun 25 17:34:21 2023 UTC add test coverage for tog displaying a symlink commit - cbb35faca2dd0bef98f640a9a0a87ca48c429454 commit + 94d1a66aaad059d61f5a244f4ffbe0607ae52d59 blob - 767a816949acdc89e85319bb9909f115024b5579 blob + c26b425e144352ef6828dcd4df36836b60aee6c9 --- regress/tog/tree.sh +++ regress/tog/tree.sh @@ -142,7 +142,44 @@ EOF test_done "$testroot" "$ret" } +test_tree_symlink() +{ + test_init tree_symlink 48 8 + + (cd $testroot/repo && ln -s alpha symlink) + (cd $testroot/repo && git add symlink) + git_commit $testroot/repo -m "symlink to alpha" + local head_id=`git_show_head $testroot/repo` + + cat <$TOG_TEST_SCRIPT +SCREENDUMP +EOF + + cat <$testroot/view.expected +commit $head_id +[1/5] / + + alpha + beta + epsilon/ + gamma/ + symlink@ -> alpha +EOF + + cd $testroot/repo && tog tree + cmp -s $testroot/view.expected $testroot/view + ret=$? + if [ $ret -ne 0 ]; then + diff -u $testroot/view.expected $testroot/view + test_done "$testroot" "$ret" + return 1 + fi + + test_done "$testroot" "$ret" +} + test_parseargs "$@" run_test test_tree_basic run_test test_tree_vsplit_blame run_test test_tree_hsplit_blame +run_test test_tree_symlink