aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-01-15 15:06:12 +0900
committerwatiko <service@mail.watiko.net>2016-02-01 03:47:08 +0900
commita5f361e470c816ec9258fb815befafdef52b000b (patch)
treec35c74316b7a4f1a6aa486d41eaf9fae3b122f45 /src/nvim/testdir
parent7fc996abf6151364ec045607a6e1ab51e32920e5 (diff)
downloadrneovim-a5f361e470c816ec9258fb815befafdef52b000b.tar.gz
rneovim-a5f361e470c816ec9258fb815befafdef52b000b.tar.bz2
rneovim-a5f361e470c816ec9258fb815befafdef52b000b.zip
vim-patch:7.4.1027
Problem: No support for binary numbers. Solution: Add "bin" to nrformats. (Jason Schulz) https://github.com/vim/vim/commit/887c1fea4a114e7170091942d0446c8882701b5b
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_increment.in114
-rw-r--r--src/nvim/testdir/test_increment.ok47
2 files changed, 161 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_increment.in b/src/nvim/testdir/test_increment.in
index 2ae6b8a563..753951d40c 100644
--- a/src/nvim/testdir/test_increment.in
+++ b/src/nvim/testdir/test_increment.in
@@ -286,6 +286,49 @@ Text:
1) Ctrl-V f3 <ctrl-a>
0x124456
+22) Block increment on 0b0
+Text:
+0b1
+0b1
+ Expected:
+ 1) Ctrl-A on visually block selected region (cursor at beginning):
+ 0b10
+ 0b10
+ 2) Ctrl-A on visually block selected region (cursor at end)
+ 0b10
+ 0b10
+
+23) block-wise increment on part of binary
+Text:
+0b1001
+
+ Expected:
+ 1) Ctrl-V 5l <ctrl-a>
+0b1011
+
+24) increment hexadecimal
+Text:
+0x0b1001
+
+ Expected:
+ 1) <ctrl-a>
+0x0b1002
+
+25) increment binary with nrformats including alpha
+Text:
+0b1001a
+
+ Expected:
+ 1) <ctrl-a>
+0b1010a
+
+26) increment binary with 64 bits
+Text:
+0b1111111111111111111111111111111111111111111111111111111111111110
+
+ Expected:
+ 1) <ctrl-a>
+0b1111111111111111111111111111111111111111111111111111111111111111
STARTTEST
@@ -415,6 +458,38 @@ V3kg..
:set nrformats&vim
f3
+:" Test 22
+:/^S22=/+,/^E22=/-y a
+:/^E22=/+put a
+kj$j:.+put a
+k$+
+
+:" Test 23
+:/^S23=/+,/^E23=/-y a
+:/^E23=/+put a
+:set nrformats&vim
+4l
+
+:" Test 24
+:/^S24=/+,/^E24=/-y a
+:/^E24=/+put a
+:set nrformats&vim
+$
+
+:" Test 25
+:set nrformats+=alpha
+:/^S25=/+,/^E25=/-y a
+:/^E25=/+put a
+k$
+:set nrformats&vim
+
+:" Test 26
+:set nrformats+=alpha
+:/^S26=/+,/^E26=/-y a
+:/^E26=/+put a
+k$
+:set nrformats&vim
+
:" Save the report
:/^# Test 1/,$w! test.out
:qa!
@@ -615,6 +690,45 @@ E21====
+# Test 22
+S22====
+0b1
+0b1
+E22====
+
+
+
+
+# Test 23
+S23====
+0b1001
+E23====
+
+
+
+
+# Test 24
+S24====
+0x0b1001
+E24====
+
+
+
+
+# Test 25
+S25====
+0b1001a
+E25====
+
+
+
+
+# Test 26
+S26====
+0b1111111111111111111111111111111111111111111111111111111111111110
+E26====
+
+
ENDTEST
diff --git a/src/nvim/testdir/test_increment.ok b/src/nvim/testdir/test_increment.ok
index 15d0e9b50b..4d8fbb0ae1 100644
--- a/src/nvim/testdir/test_increment.ok
+++ b/src/nvim/testdir/test_increment.ok
@@ -288,6 +288,53 @@ E21====
0x124456
+# Test 22
+S22====
+0b1
+0b1
+E22====
+
+0b10
+0b10
+
+0b10
+0b10
+
+
+# Test 23
+S23====
+0b1001
+E23====
+
+0b1011
+
+
+
+# Test 24
+S24====
+0x0b1001
+E24====
+
+0x0b1002
+
+
+
+# Test 25
+S25====
+0b1001a
+E25====
+
+0b1010a
+
+
+
+# Test 26
+S26====
+0b1111111111111111111111111111111111111111111111111111111111111110
+E26====
+
+0b1111111111111111111111111111111111111111111111111111111111111111
+
ENDTEST