changeset 9361:f089eb0a5fa4 v7.4.1962

commit https://github.com/vim/vim/commit/52df117df724a7ad20affdf15214d2df2e507dcc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 26 19:38:19 2016 +0200 patch 7.4.1962 Problem: Two test files for increment/decrement. Solution: Move the old style test into the new style test. (Hirohito Higashi, closes https://github.com/vim/vim/issues/881)
author Christian Brabandt <cb@256bit.org>
date Sun, 26 Jun 2016 19:45:06 +0200
parents 25b3f5287dbc
children 2e1b128a526f
files src/Makefile src/testdir/Make_all.mak src/testdir/main.aap src/testdir/test35.in src/testdir/test35.ok src/testdir/test_increment.vim src/version.c
diffstat 7 files changed, 25 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile
+++ b/src/Makefile
@@ -1996,7 +1996,7 @@ test1 \
 	test2 test3 test4 test5 test6 test7 test8 test9 \
 	test11 test12 test13 test14 test15 test16 test17 test18 test19 \
 	test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
-	test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
+	test30 test31 test32 test33 test34 test36 test37 test38 test39 \
 	test40 test41 test42 test43 test44 test45 test46 test47 test48 test49 \
 	test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
 	test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -32,7 +32,6 @@ SCRIPTS_ALL = \
 	test31.out \
 	test33.out \
 	test34.out \
-	test35.out \
 	test36.out \
 	test37.out \
 	test38.out \
--- a/src/testdir/main.aap
+++ b/src/testdir/main.aap
@@ -10,7 +10,7 @@ Scripts = test1.out test2.out test3.out 
 		test18.out test19.out test20.out test21.out test22.out
 		test23.out test24.out test25.out test26.out test27.out
 		test28.out test29.out test30.out test31.out test32.out
-		test33.out test34.out test35.out test36.out test37.out
+		test33.out test34.out test36.out test37.out
 		test38.out test39.out test40.out test41.out test42.out
 		test43.out test44.out test45.out test46.out test47.out
 		test48.out test49.out test74.out
deleted file mode 100644
--- a/src/testdir/test35.in
+++ /dev/null
@@ -1,21 +0,0 @@
-Test Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,
-and octal numbers.
-
-STARTTEST
-/^start-here
-:set nrformats=octal,hex
-j102ll64128$
-:set nrformats=octal
-0102l2w65129blx6lD
-:set nrformats=hex
-0101l257Txldt   
-:set nrformats=
-0200l100w78k
-:$-3,$wq! test.out
-ENDTEST
-
-start-here
-100     0x100     077     0
-100     0x100     077     
-100     0x100     077     0xfF     0xFf
-100     0x100     077     
deleted file mode 100644
--- a/src/testdir/test35.ok
+++ /dev/null
@@ -1,4 +0,0 @@
-0     0x0ff     0000     -1
-0     1x100     0777777
--1     0x0     078     0xFE     0xfe
--100     -100x100     000     
--- a/src/testdir/test_increment.vim
+++ b/src/testdir/test_increment.vim
@@ -735,5 +735,26 @@ func Test_normal_increment_02()
   call assert_equal([0, 2, 4, 0], getpos('.'))
 endfunc
 
+" The test35 unified to this file.
+func Test_normal_increment_03()
+  call setline(1, ["100     0x100     077     0",
+        \          "100     0x100     077     ",
+        \          "100     0x100     077     0xfF     0xFf",
+        \          "100     0x100     077     "])
+  set nrformats=octal,hex
+  exec "norm! gg\<C-A>102\<C-X>\<C-A>l\<C-X>l\<C-A>64\<C-A>128\<C-X>$\<C-X>"
+  set nrformats=octal
+  exec "norm! j0\<C-A>102\<C-X>\<C-A>l\<C-X>2\<C-A>w65\<C-A>129\<C-X>blx6lD"
+  set nrformats=hex
+  exec "norm! j0101\<C-X>l257\<C-X>\<C-A>Txldt \<C-A> \<C-X> \<C-X>"
+  set nrformats=
+  exec "norm! j0200\<C-X>l100\<C-X>w78\<C-X>\<C-A>k"
+  call assert_equal(["0     0x0ff     0000     -1",
+        \            "0     1x100     0777777",
+        \            "-1     0x0     078     0xFE     0xfe",
+        \            "-100     -100x100     000     "], getline(1, '$'))
+  call assert_equal([0, 3, 25, 0], getpos('.'))
+endfunc
+
 
 " vim: tabstop=2 shiftwidth=2 expandtab
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1962,
+/**/
     1961,
 /**/
     1960,