patch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading
Commit: https://github.com/vim/vim/commit/cf2642fc72be6da0db56f81b58af66b6835e277b Author: Drew Vogel <dvogel@github> Date: Fri Apr 25 19:06:53 2025 +0200 patch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading Problem: tests: Test_xxd_color2() test failure dump diff is misleading Solution: Ensure the reference dump and the test dump are both processed the same (Drew Vogel). Background: Commit b6dc76b6fd23e571d309064b795847ee9ffc7689 sought to make the xxd screendump tests compatible with non-standard `XXD` overrides. It provides a vim script that matches a very general `xxd` command pattern but then also removed the matching line from the reference dump. This second step was unnecessary because `VerifyScreenDump()` runs the associated vim script against both the reference dump and the test dump. Problem Details: As part of some unrelated work, the GUI tests were failing with a window size 1 column too narrow. The screendumps in `Test_xxd_color2` were failing as a result. When I loaded the diff using `term_dumpdiff()` the associated vim scripts are not run. As a result, the test dump contained the `xxd` invocation on line 1 while reference dump did not. This throws the diff off, obscuring the true issue of the GUI window being too narrow. Verification: In addition to the test suite, locally I've tried to recreate the issue being fixed in b6dc76b6fd23e571d309064b795847ee9ffc7689. Setting a very non-standard `XXD` path, this test still passes: ``` XXD=/home/dvogel/opt/vim/bin/xxd TEST_FILTER=Test_xxd_color2 TERM=xterm-color make test_xxd rm -f test_xxd.res test.log messages starttime if test -n "${ASAN_OPTIONS}"; then \ XXD=../xxd/xxd; export XXD; ASAN_OPTIONS="${ASAN_OPTIONS}_test_xxd" \ UBSAN_OPTIONS="${UBSAN_OPTIONS}_test_xxd" VIMRUNTIME=../../runtime ../vim -f \ -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S \ runtest.vim test_xxd.vim ; \ fi From test_xxd.vim: Executed Test_xxd_color2() in 0.066049 seconds Filtered 17 tests with $TEST_FILTER and $TEST_SKIP_PAT Executed 1 test in 0.096862 seconds ``` closes: #17202 Signed-off-by: Drew Vogel <dvogel@github> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/testdir/dumps/Test_xxd_color_0.dump b/src/testdir/dumps/Test_xxd_color_0.dump index 73cbe6b69..0b3b5fc16 100644 --- a/src/testdir/dumps/Test_xxd_color_0.dump +++ b/src/testdir/dumps/Test_xxd_color_0.dump @@ -1,4 +1,5 @@ -|$+0&#ffffff0| |0@7|:| |0@2|1| |0|2|0|3| |0|4|0|5| |0|6|0|7| |0|8|0|9| |0|a|0|b| |0|c|0|d| |0|e|0|f| @1|.@15| @7 +|$+0&#ffffff0| |.@1|/|x@1|d|/|x@1|d| |-|R| |n|e|v|e|r| @1|<| |X@1|D|f|i|l|e|_|c|o|l|o|r|s| @35 +|0@7|:| |0@2|1| |0|2|0|3| |0|4|0|5| |0|6|0|7| |0|8|0|9| |0|a|0|b| |0|c|0|d| |0|e|0|f| @1|.@15| @7 |0@5|1|0|:| |1|0|1@1| |1|2|1|3| |1|4|1|5| |1|6|1|7| |1|8|1|9| |1|a|1|b| |1|c|1|d| |1|e|1|f| @1|.@15| @7 |0@5|2|0|:| |2|0|2|1| |2@2|3| |2|4|2|5| |2|6|0@1| |2|8|2|9| |2|a|2|b| |2|c|2|d| |2|e|2|f| @2|!|"|#|$|%|&|.|(|)|*|+|,|-|.|/| @7 |0@5|3|0|:| |3|0|3|1| |3|2|3@1| |3|4|3|5| |3|6|3|7| |3|8|3|9| |3|a|3|b| |3|c|3|d| |3|e|3|f| @1|0|1|2|3|4|5|6|7|8|9|:|;|<|=|>|?| @7 diff --git a/src/testdir/dumps/Test_xxd_color_1.vim b/src/testdir/dumps/Test_xxd_color_1.vim index daf8dd390..7ac1f2647 100644 --- a/src/testdir/dumps/Test_xxd_color_1.vim +++ b/src/testdir/dumps/Test_xxd_color_1.vim @@ -1,3 +1,2 @@ " Filter that removes the Shell Prompt from the xxd command -" 18,20d -:1s#|\$+0&\#ffffff0| |.@1|/|x@1|d|/|x@1|d|.* #|$+0\&\#ffffff0| #e +:1s#|\$+0&\#ffffff0| \S\+/|x@1|d|.* #|$+0\&\#ffffff0| #e diff --git a/src/version.c b/src/version.c index 1e8d8e350..4f7996a99 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1345, /**/ 1344, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1u8Mdq-007Q0g-Eb%40256bit.org.