aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_utf8_comparisons.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_utf8_comparisons.vim')
-rw-r--r--test/old/testdir/test_utf8_comparisons.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/old/testdir/test_utf8_comparisons.vim b/test/old/testdir/test_utf8_comparisons.vim
index f3c86b44fb..2c1972b087 100644
--- a/test/old/testdir/test_utf8_comparisons.vim
+++ b/test/old/testdir/test_utf8_comparisons.vim
@@ -92,3 +92,40 @@ func Test_gap()
call feedkeys("gg0g~ap", "tx")
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