From: Mark Jamsek Subject: regress/tog: add log view T keymap test for work tree entries To: gameoftrees@openbsd.org Date: Mon, 30 Dec 2024 23:42:13 +1100 As per the subject, this diff adds a tog log view worktree entry T keymap regression test. commit df52487ea7578a5db6bc5b8a2e4c319c5742c1de (main) from: Mark Jamsek date: Mon Dec 30 11:18:34 2024 UTC regress/tog: log view test for T keymap on worktree entry M regress/tog/log.sh | 43+ 0- 1 file changed, 43 insertions(+), 0 deletions(-) commit - 74bea526c558fb385ffcbb01e4e271523cebb168 commit + df52487ea7578a5db6bc5b8a2e4c319c5742c1de blob - 5afc587650afd7ac221d87769ed311be1bdde14f blob + 5329319eb952b701fc799caf6f0648c80bd83b52 --- regress/tog/log.sh +++ regress/tog/log.sh @@ -290,6 +290,49 @@ EOF return 1 fi + # test T keymap on a work tree entry + got checkout "$testroot/repo" "$testroot/wt" > /dev/null + ret=$? + if [ $ret -ne 0 ]; then + echo "got checkout failed unexpectedly" + test_done "$testroot" "$ret" + return 1 + fi + + cd "$testroot/wt" + echo "'alpha" >> alpha + + local id10=$(trim_obj_id 10 $head_id) + + cat <<-EOF >$TOG_TEST_SCRIPT + WAIT_FOR_UI wait for log thread to fetch wt state + T open tree view + S toggle horizontal split + SCREENDUMP + EOF + + cat <$testroot/view.expected +diff $testroot/wt (work tree changes) [0/1] maste +$ymd flan_hacker work tree changes based on [$id10] +-------------------------------------------------------------------------------- +commit $head_id +[1/4] / + + alpha + beta + epsilon/ + gamma/ +EOF + + tog log + 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" } -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68