From 08635d47e4f6f9f93bcd6b5f14b6b7715c132bfe Mon Sep 17 00:00:00 2001 From: gh-liu Date: Wed, 7 Aug 2024 12:04:59 +0800 Subject: [PATCH] fix: correct some test cases --- .../tests-test_fold_line.lua---__test_001 | 40 +++++++++---------- .../tests-test_fold_line.lua---__test_002 | 36 ++++++++--------- tests/testcases/test_001.txt | 26 ++++++------ tests/testcases/test_001.vim | 6 --- tests/testcases/test_002.txt | 20 +++++----- tests/testcases/test_002.vim | 8 +--- 6 files changed, 63 insertions(+), 73 deletions(-) diff --git a/tests/screenshots/tests-test_fold_line.lua---__test_001 b/tests/screenshots/tests-test_fold_line.lua---__test_001 index 593bdba..418f463 100644 --- a/tests/screenshots/tests-test_fold_line.lua---__test_001 +++ b/tests/screenshots/tests-test_fold_line.lua---__test_001 @@ -1,14 +1,14 @@ --|---------|---------|---------|---------|---------|---------|---------|---------| -01|│old -02|│ ┌fold -03|│ │fold -04|│---- ├ lines: fold···························································· -05|│ │fold -06|└---- ╘ lines: fold···························································· -07|~ -08|~ -09|~ -10|~ +01|┌fold +02|│fold +03|│fold +04|│fold +05|│fold +06|│ ┌fold +07|│ │fold +08|│---- 2├lines: fold···························································· +09|│ │fold +10|└---- 3╘lines: fold···························································· 11|~ 12|~ 13|~ @@ -21,20 +21,20 @@ 20|~ 21|~ 22|~ -23|tests/testcases/test_001.txt 8,1 Bot +23|tests/testcases/test_001.txt 11,2-1 All 24| --|---------|---------|---------|---------|---------|---------|---------|---------| 01|01111111111111111111111111111111111111111111111111111111111111111111111111111111 -02|01111112111111111111111111111111111111111111111111111111111111111111111111111111 -03|01111112111111111111111111111111111111111111111111111111111111111111111111111111 -04|00000003000000000000000000000000000000000000000000000000000000000000000000000000 -05|01111112111111111111111111111111111111111111111111111111111111111111111111111111 -06|00000003000000000000000000000000000000000000000000000000000000000000000000000000 -07|22222222222222222222222222222222222222222222222222222222222222222222222222222222 -08|22222222222222222222222222222222222222222222222222222222222222222222222222222222 -09|22222222222222222222222222222222222222222222222222222222222222222222222222222222 -10|22222222222222222222222222222222222222222222222222222222222222222222222222222222 +02|01111111111111111111111111111111111111111111111111111111111111111111111111111111 +03|01111111111111111111111111111111111111111111111111111111111111111111111111111111 +04|01111111111111111111111111111111111111111111111111111111111111111111111111111111 +05|01111111111111111111111111111111111111111111111111111111111111111111111111111111 +06|01111111211111111111111111111111111111111111111111111111111111111111111111111111 +07|01111111211111111111111111111111111111111111111111111111111111111111111111111111 +08|00000000300000000000000000000000000000000000000000000000000000000000000000000000 +09|01111111211111111111111111111111111111111111111111111111111111111111111111111111 +10|00000000300000000000000000000000000000000000000000000000000000000000000000000000 11|22222222222222222222222222222222222222222222222222222222222222222222222222222222 12|22222222222222222222222222222222222222222222222222222222222222222222222222222222 13|22222222222222222222222222222222222222222222222222222222222222222222222222222222 diff --git a/tests/screenshots/tests-test_fold_line.lua---__test_002 b/tests/screenshots/tests-test_fold_line.lua---__test_002 index 6daa579..a4afd15 100644 --- a/tests/screenshots/tests-test_fold_line.lua---__test_002 +++ b/tests/screenshots/tests-test_fold_line.lua---__test_002 @@ -1,12 +1,12 @@ --|---------|---------|---------|---------|---------|---------|---------|---------| -01|│ │ ┌fold -02|│ │ │ ┌fold -03|│ │ │ │fold -04|│ │ │ │fold -05|│ │ │ │fold -06|│ │ │ │fold -07|│ │ │ │fold -08|└ └ └ └fold +01|┌fold +02|│ ┌fold +03|│ │ ┌fold +04|└----- └ lines:╘fold··························································· +05|~ +06|~ +07|~ +08|~ 09|~ 10|~ 11|~ @@ -21,18 +21,18 @@ 20|~ 21|~ 22|~ -23|tests/testcases/test_002.txt 4,1 Bot +23|tests/testcases/test_002.txt 4,2-1 All 24| --|---------|---------|---------|---------|---------|---------|---------|---------| -01|01111110111111101111111111111111111111111111111111111111111111111111111111111111 -02|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -03|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -04|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -05|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -06|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -07|01111110111111101111111211111111111111111111111111111111111111111111111111111111 -08|01111110111111101111111211111111111111111111111111111111111111111111111111111111 +01|01111111111111111111111111111111111111111111111111111111111111111111111111111111 +02|01111111011111111111111111111111111111111111111111111111111111111111111111111111 +03|01111111011111112111111111111111111111111111111111111111111111111111111111111111 +04|00000000000000003000000000000000000000000000000000000000000000000000000000000000 +05|22222222222222222222222222222222222222222222222222222222222222222222222222222222 +06|22222222222222222222222222222222222222222222222222222222222222222222222222222222 +07|22222222222222222222222222222222222222222222222222222222222222222222222222222222 +08|22222222222222222222222222222222222222222222222222222222222222222222222222222222 09|22222222222222222222222222222222222222222222222222222222222222222222222222222222 10|22222222222222222222222222222222222222222222222222222222222222222222222222222222 11|22222222222222222222222222222222222222222222222222222222222222222222222222222222 @@ -47,5 +47,5 @@ 20|22222222222222222222222222222222222222222222222222222222222222222222222222222222 21|22222222222222222222222222222222222222222222222222222222222222222222222222222222 22|22222222222222222222222222222222222222222222222222222222222222222222222222222222 -23|33333333333333333333333333333333333333333333333333333333333333333333333333333333 +23|44444444444444444444444444444444444444444444444444444444444444444444444444444444 24|11111111111111111111111111111111111111111111111111111111111111111111111111111111 diff --git a/tests/testcases/test_001.txt b/tests/testcases/test_001.txt index 2cc52d6..0d68f65 100644 --- a/tests/testcases/test_001.txt +++ b/tests/testcases/test_001.txt @@ -1,13 +1,13 @@ -fold -fold -fold -fold -fold - fold - fold - fold - fold - fold - fold - fold - fold + fold + fold + fold + fold + fold + fold + fold + fold + fold + fold + fold + fold + fold diff --git a/tests/testcases/test_001.vim b/tests/testcases/test_001.vim index 9bc22e3..df0c394 100644 --- a/tests/testcases/test_001.vim +++ b/tests/testcases/test_001.vim @@ -20,10 +20,4 @@ normal! zo normal! zc 11 normal! zc -let s:l = 8 - ((7 * winheight(0) + 23) / 47) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 8 -normal! 0 " vim: set ft=vim : diff --git a/tests/testcases/test_002.txt b/tests/testcases/test_002.txt index 81889d5..997a275 100644 --- a/tests/testcases/test_002.txt +++ b/tests/testcases/test_002.txt @@ -1,10 +1,10 @@ -fold - fold - fold - fold - fold - fold - fold - fold - fold - fold + fold + fold + fold + fold + fold + fold + fold + fold + fold + fold diff --git a/tests/testcases/test_002.vim b/tests/testcases/test_002.vim index 8611ffd..deb0993 100644 --- a/tests/testcases/test_002.vim +++ b/tests/testcases/test_002.vim @@ -18,10 +18,6 @@ normal! zo normal! zo 3 normal! zo -let s:l = 4 - ((3 * winheight(0) + 23) / 47) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 4 -normal! 0 +4 +normal! zc " vim: set ft=vim :