aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-10-08 23:32:24 +0200
committerGitHub <noreply@github.com>2023-10-08 23:32:24 +0200
commit61f1e992ce984371a8d570c4dbb34ff759f5751a (patch)
treee57f0cc2a0138540271890c421e6c451e04a9f81 /test/functional/ui
parente5855697e90e379128a018a8d88cf5ec008b0623 (diff)
parentddef39299f357d3131644647379e88a69749bf40 (diff)
downloadrneovim-61f1e992ce984371a8d570c4dbb34ff759f5751a.tar.gz
rneovim-61f1e992ce984371a8d570c4dbb34ff759f5751a.tar.bz2
rneovim-61f1e992ce984371a8d570c4dbb34ff759f5751a.zip
Merge pull request #25503 from bfredl/unishape
refactor(grid): do arabic shaping in one place
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/fold_spec.lua8
-rw-r--r--test/functional/ui/multibyte_spec.lua51
2 files changed, 55 insertions, 4 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index f42682ba69..7894c8296b 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -1156,7 +1156,7 @@ describe("folded lines", function()
[2:---------------------------------------------]|
[3:---------------------------------------------]|
## grid 2
- {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}|
+ {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺎﻠﻋَﺮَﺒِﻳَّﺓ·················}|
{1:~ }|
{1:~ }|
{1:~ }|
@@ -1168,7 +1168,7 @@ describe("folded lines", function()
]])
else
screen:expect([[
- {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}|
+ {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺎﻠﻋَﺮَﺒِﻳَّﺓ·················}|
{1:~ }|
{1:~ }|
{1:~ }|
@@ -1337,7 +1337,7 @@ describe("folded lines", function()
[2:---------------------------------------------]|
[3:---------------------------------------------]|
## grid 2
- {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}|
+ {5:·················ﺔﻴَّﺑِﺮَﻌَﻟﺍ x̎͂̀̂͛͛ 语 å :senil 2 --^+}|
{1: ~}|
{1: ~}|
{1: ~}|
@@ -1349,7 +1349,7 @@ describe("folded lines", function()
]])
else
screen:expect([[
- {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}|
+ {5:·················ﺔﻴَّﺑِﺮَﻌَﻟﺍ x̎͂̀̂͛͛ 语 å :senil 2 --^+}|
{1: ~}|
{1: ~}|
{1: ~}|
diff --git a/test/functional/ui/multibyte_spec.lua b/test/functional/ui/multibyte_spec.lua
index 417c7b797c..077dd1a779 100644
--- a/test/functional/ui/multibyte_spec.lua
+++ b/test/functional/ui/multibyte_spec.lua
@@ -177,6 +177,57 @@ describe("multibyte rendering", function()
|
]], reset=true}
end)
+
+ it('works with arabic input and arabicshape', function()
+ command('set arabic')
+
+ command('set noarabicshape')
+ feed('isghl!<esc>')
+ screen:expect{grid=[[
+ ^!مالس|
+ {1: ~}|
+ {1: ~}|
+ {1: ~}|
+ {1: ~}|
+ |
+ ]]}
+
+ command('set arabicshape')
+ screen:expect{grid=[[
+ ^!ﻡﻼﺳ|
+ {1: ~}|
+ {1: ~}|
+ {1: ~}|
+ {1: ~}|
+ |
+ ]]}
+ end)
+
+ it('works with arabic input and arabicshape and norightleft', function()
+ command('set arabic norightleft')
+
+ command('set noarabicshape')
+ feed('isghl!<esc>')
+ screen:expect{grid=[[
+ سلام^! |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+
+ command('set arabicshape')
+ screen:expect{grid=[[
+ ﺱﻼﻣ^! |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+
+ end)
end)
describe('multibyte rendering: statusline', function()