summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_utf8_comparisons.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
commitaafdfa61bb0af95e98ca825d1f7839801c22d434 (patch)
treeb792417ed6c2f7764f816aecd177e46b1baad149 /src/testdir/test_utf8_comparisons.vim
parentAdding debian version 2:9.1.0016-1. (diff)
downloadvim-aafdfa61bb0af95e98ca825d1f7839801c22d434.tar.xz
vim-aafdfa61bb0af95e98ca825d1f7839801c22d434.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_utf8_comparisons.vim')
-rw-r--r--src/testdir/test_utf8_comparisons.vim35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/testdir/test_utf8_comparisons.vim b/src/testdir/test_utf8_comparisons.vim
index 3431226..2c1972b 100644
--- a/src/testdir/test_utf8_comparisons.vim
+++ b/src/testdir/test_utf8_comparisons.vim
@@ -93,4 +93,39 @@ func Test_gap()
call assert_equal(["ABCD", "", "defg"], getline(1,3))
endfunc
+" test that g~, ~ and gU correctly upper-cases ß
+func Test_uppercase_sharp_ss()
+ new
+ call setline(1, repeat(['ß'], 4))
+
+ call cursor(1, 1)
+ norm! ~
+ call assert_equal('ẞ', getline(line('.')))
+ norm! ~
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(2, 1)
+ norm! g~l
+ call assert_equal('ẞ', getline(line('.')))
+ norm! g~l
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(3, 1)
+ norm! gUl
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgU
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgu
+ call assert_equal('ß', getline(line('.')))
+ norm! gul
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(4, 1)
+ norm! vgU
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgu
+ call assert_equal('ß', getline(line('.')))
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab