[FarGroup/FarManager] master: Fix tests (e79bd4a1f)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Jan 28, 2026, 7:45:54 PM (9 days ago) Jan 28
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/e79bd4a1f551e2c963eb0dd54834d5cbd8e710d1

>---------------------------------------------------------------

commit e79bd4a1f551e2c963eb0dd54834d5cbd8e710d1
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Thu Jan 29 00:30:29 2026 +0000

Fix tests


>---------------------------------------------------------------

e79bd4a1f551e2c963eb0dd54834d5cbd8e710d1
far/interf.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/far/interf.cpp b/far/interf.cpp
index 6394fd52f..a3d304d9e 100644
--- a/far/interf.cpp
+++ b/far/interf.cpp
@@ -1904,6 +1904,7 @@ TEST_CASE("wide_chars")
std::initializer_list<std::pair<size_t, int>>
StringToVisual,
VisualToString;
+ bool VtRequired;
}
Tests[]
{
@@ -1931,11 +1932,13 @@ TEST_CASE("wide_chars")
L"𐀀"sv, // Surrogate, half width
{ { 0, +0 }, { 1, -1 }, { 2, -1 }, { 3, -1 }, { 4, -1 }, },
{ { 0, +0 }, { 1, +1 }, { 2, +1 }, { 3, +1 }, { 4, +1 }, },
+ true,
},
{
L"𐀀𐀀"sv, // Surrogate, half width
{ { 0, +0 }, { 1, -1 }, { 2, -1 }, { 3, -2 }, { 4, -2 }, },
{ { 0, +0 }, { 1, +1 }, { 2, +2 }, { 3, +2 }, { 4, +2 }, },
+ true,
},
{
L"𠲖"sv, // Surrogate, full width
@@ -1950,14 +1953,20 @@ TEST_CASE("wide_chars")
{
L"残酷な天使のように少年よ神話になれ"sv,
{ {17, +17}, },
- { {34, -17} } },
+ { {34, -17} },
+ },

};

+ const auto IsVtActive = console.IsVtActive();
+
char_width::enable(1);

for (const auto& i: Tests)
{
+ if (i.VtRequired && !IsVtActive)
+ continue;
+
position_parser_state State[2];

for (const auto& [StringPos, VisualShift]: i.StringToVisual)


Reply all
Reply to author
Forward
0 new messages