fix test.yml and DEVELOEPR.md and emacs.sh

pull/3903/head
Jia Hu 2024-03-21 01:05:37 -04:00
parent a9810bdbbe
commit c847ed3983
3 changed files with 89 additions and 9 deletions

View File

@ -31,7 +31,7 @@ The '[lock.yml](https://github.com/tmux/tmux/blob/master/.github/workflows/lock.
The clang-linter.yml file contains the workflow to run clang-tidy linter on every push and pull request and if the linter fails with errors then it will comment on the PR that caused the failure informing about the linting errors. It first installs the required dependencies to run the workflow and sets up Autotools using the configure script. Then it generates compile_commands.json which will be used by the linter to look for errors in multiple files. Then finally the clang-tidy linter is run on the code and if the linter returns an error, the workflow uses actions/github-script to comment on the PR informing the about the error.
The ci.yml file is configured to execute CI tests for each push or pull request, ensuring a more efficient and automated testing process. The tests complete within approximately 2 minutes, providing quick feedback. If a test fails, it displays a clear error message detailing the discrepancy between the actual and expected output. Additionally, the workflow covers dependency installation and program building, flagging any errors in these stages too.
The test.yml file is configured to execute CI tests for each push or pull request, ensuring a more efficient and automated testing process. The tests complete within approximately 2 minutes, providing quick feedback. If a test fails, it displays a clear error message detailing the discrepancy between the actual and expected output. Additionally, the workflow covers dependency installation and program building, flagging any errors in these stages too.
The doc_review_reminder.yml contains a workflow that automatically creates an issue every six months as a reminder for documentation reviewers. This scheduled reminder is crucial for maintaining up-to-date and accurate documentation. By periodically prompting reviewers, the workflow ensures that the documentation is regularly examined and updated, reflecting any changes or improvements in the project.

View File

@ -59,7 +59,17 @@ $TMUX send-keys -X next-word
$TMUX send-keys -X begin-selection
$TMUX send-keys -X next-word
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "$(printf "line\n")" ] || exit 1
if [ "$($TMUX show-buffer)" = "$(printf "line\n")" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `next-word-end` treats periods as letters.
$TMUX send-keys -X next-word
@ -73,14 +83,34 @@ $TMUX send-keys -X previous-word
$TMUX send-keys -X begin-selection
$TMUX send-keys -X next-word
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "$(printf "line...\n")" ] || exit 1
if [ "$($TMUX show-buffer)" = "$(printf "line...\n")" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `previous-space` and `next-space` treat periods as letters.
$TMUX send-keys -X previous-space
$TMUX send-keys -X begin-selection
$TMUX send-keys -X next-space
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "$(printf "line...\n")" ] || exit 1
if [ "$($TMUX show-buffer)" = "$(printf "line...\n")" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `next-word` and `next-word-end` treat other symbols as letters.
$TMUX send-keys -X begin-selection
@ -89,7 +119,17 @@ $TMUX send-keys -X next-word
$TMUX send-keys -X next-word-end
$TMUX send-keys -X next-word-end
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "... @nd then \$ym_bols[]{}" ] || exit 1
if [ "$($TMUX show-buffer)" = "... @nd then \$ym_bols[]{}" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `previous-word` treats other symbols as letters
# and `next-word` wraps around for indented symbols
@ -97,20 +137,50 @@ $TMUX send-keys -X previous-word
$TMUX send-keys -X begin-selection
$TMUX send-keys -X next-word
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "$(printf "\$ym_bols[]{}\n ")" ] || exit 1
if [ "$($TMUX show-buffer)" = "$(printf "\$ym_bols[]{}\n ")" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `next-word-end` treats digits as letters
$TMUX send-keys -X next-word-end
$TMUX send-keys -X begin-selection
$TMUX send-keys -X next-word-end
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = " 500xyz" ] || exit 1
if [ "$($TMUX show-buffer)" = " 500xyz" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `previous-word` treats digits as letters
$TMUX send-keys -X begin-selection
$TMUX send-keys -X previous-word
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "500xyz" ] || exit 1
if [ "$($TMUX show-buffer)" = "500xyz" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
# Test that `next-word` and `next-word-end` stop at the end of text.
$TMUX send-keys -X begin-selection
@ -120,7 +190,17 @@ $TMUX send-keys -X next-word
$TMUX send-keys -X next-space
$TMUX send-keys -X next-space-end
$TMUX send-keys -X copy-selection
[ "$($TMUX show-buffer)" = "500xyz" ] || exit 1
if [ "$($TMUX show-buffer)" = "500xyz" ]
then
actual=$($TMUX show-buffer)
expected=$(printf "words\n Indented")
echo "actual: "
echo $actual
echo "expected: "
echo $expected
exit 1
fi
$TMUX kill-server 2>/dev/null
exit 0